+ 1
Shouldn't "String" start with lower letter like "string"?
2 Respostas
+ 15
In Java, strings are objects. As with other objects, you can create an instance of a string with the new keyword, as follows:
String s = new String();
This line of code creates a new object of class String and assigns it to the reference variable s.
+ 5
Beacuse String is a class name it is case sensitive.