class
Test {
public static void main(
String[] args){
new Test().stringTest();
}
public void stringTest() {
String secondName = null; // Version 1
String secondName = ""; // Version 2
String firstName = "Java";
secondName = firstName + " Ranch";
System.out.println(secondName);
}
}
What is the difference between version 1 and version 2 in initializing the String.