It's ok but if run the below program it perfectly executes with out error saying that s is not initialized with string value.
public class
Test {
public static void main(String[] args) throws Exception {
step1 String s="";
step2 //String s2;//leads to compile time error because no value is initialized
System.out.println(s.length());
}
}
I think step1 an step2 are same. :roll: :roll: