DRAFT
Observed
One cannot invoke methods on String literals
One can invoke methods on String literals
A String
literal denotes a String
object. One can invoke methods on it like one can invoke methods on any String
object. All the following are correct:
int a = "Hi".length();
int b = new String("Hey").length();
String s = "Ho";
int c = s.length();