Java Strings – What is the difference between "Java" and new String("java")?

Given this example code: class basic { public static void main(String[] args) { String s1 = "Java"; String s2 = new String("Java"); } } Are s1 and s2 both reference variables of an object? Do those two lines of code do the same thing? >Solution : To answer your first question: String s1 = "Java";… Read More Java Strings – What is the difference between "Java" and new String("java")?