String objects are immutable, and String reference variables are not.
If you redirect a String reference to a new String, the old String can be lost.
The String class is final. String's methods can't be overridden.
String literals are strings that are specified using double quotes.
public class MainClass{
public static void main(String[] argv){
String str = "text";
System.out.println(str);
}
}
|