Close
jGuru Forums
Posted By: fresh_guy Posted On: Thursday, July 10, 2003 09:26 PM
what is the difference between String str = "myname"; and String str = new String("myname"); ????
Re: difference between ordinary String and String object.?????
Posted By: Stephen_McConnell Posted On: Friday, July 11, 2003 05:16 AM
One takes longer to type.
This is one of the "conventions" of Java that allows you to initialize a String object either way.
Stephen McConnell