Thread: string doubt
View Single Post
  #3 (permalink)  
Old 08-02-2007, 04:47 AM
cruxblack cruxblack is offline
Senior Member
 
Join Date: Jul 2007
Posts: 130
cruxblack will become famous soon enough
From what i learn so far, in Java, String is an object, not a primitive type
The default way to create an object is by using the new keyword, like in the 2nd statement u wrote

But as to the impractical way of using a new keyword each time u create a String -which the designer assume are going to be often that is, and it certainly does- the language designer deiced to put a shortcut to instantiate a String without using the new keyword, and also to make it look similar like how u would initialize a String in other programming language
Reply With Quote