Which of the following methods will create a string in Java?

I: String S = "Hello Java”;

II: String S2 = new String (“Hello Java");

1
Only I
2
Only II
3
Both I and II
4
Neither I nor II
5
Question Not Attempted

Sponsored

hivanix.in

Visit

This quiz is brought to you by hivanix.in

🌐 Web App Development

Quick Navigation