![]() |
Using Classes, Part I |
|||||||||||
new String ("hello world")
This returns a reference to a newly created String object that.
String s;
s = new String ("The british are coming");
Using s we can continue to use this newly created object:
String upper, lower; upper = s.toUpperCase (); lower = s.toUpperCase (); System.out.println (s);