Computer Science, asked by khankarim9089, 1 year ago

What is the difference between String s1 = "Hello" and String s1= new String("Hello") in java?

Answers

Answered by thilagasam
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