If I have
String a = null;
System.out.println(a);
I'll get
null
Is there an elegant way to change this an empty string?
I could do:
if (a == null){
a="";
}
The context is that I'll be producing a string of the form:
String myString = a + "\n" + b + "\n" + c;
But I'm wondering if there's a nicer solution.