When I create a new String in Java, is it initialized with null or with " "?
- by Sergio Tapia
Here's my test code:
String foo = new String();
System.out.println(foo);
The output is blank and a new line is written. Since I'm new to Java, I don't know whether it made a " " string, or nulls are handled as blank lines.