✏️ Explanatory Question

[String]

Question:

How many String objects are created in the following snippet? Justify your answer.

String s1 = "Gujarat";

String s2 = new String("Gujarat");

String s3 = new String("Gujarat");

String s4 = "Gujarat";

👁 17 Views
📘 Detailed Answer
🟢 Easy
💡

Answer with Explanation

Answer not available right now.