What is the difference between String s1 = "Hello" and String s1= new String("Hello") in java?
Answers
Answered by
0
The word "hello" gets stored in string s1.Hello has no use in Java it's just an English word.While new has a meaning in Java. Guess new is a function.
Similar questions