Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialayub ali
Courses Plus Student 723 Pointswhat is string what is args what is method declaration
someone clarify please
1 Answer
abdijabar sambul
1,063 PointsStrings, which are widely used in Java programming, are a sequence of characters. In the Java programming language, strings are objects.
The Java platform provides the String class to create and manipulate strings.
Creating Strings The most direct way to create a string is to write:
String greeting = "Hello world!"; In this case, "Hello world!" is a string literalโa series of characters in your code that is enclosed in double quotes. Whenever it encounters a string literal in your code, the compiler creates a String object with its valueโin this case, Hello world!.
args is a short form of argument. it is what you put in the parameter, The Method Declaration A method's declaration provides a lot of information about the method to the compiler, the runtime system and to other classes and objects. Besides the name of the method, the method declaration carries information such as the return type of the method, the number and type of the arguments required by the method, and what other classes and objects can call the method.
please use google for more explanation thanks