This page contains an archived post to the Java Answers Forum made prior to February 25, 2002.
If you wish to participate in discussions, please visit the new
Artima Forums.
Message:
please explain the difference "to kishori"
Posted by saddy on November 30, 2000 at 10:06 PM
hello kishori i wanted to know the difference between the two type of declarations u specified please if u can explain them saddy > Use of String class is so frequent in java that Java Creator gave us a shortcut to create a String object without using new operator. That's it. > String str = "abc" ; > and > String str = new String ( "abc" ) ; > are same. ( In fact there is some differences in two statements, but I am not going to mention those because you didn't ask for that ) . > Thanx > Kishori
Replies:
|