There is a trick with this (and most variables, actually).
If you NEVER initialize the variable, you are actually giving the compiler more information.
In some cases you have to, but this case is really interesting:
String s;
if(a==5)
s="It was Five";
if(a==6)
s="It was Six";
System.out.print(s);
This is very bad code, but the neat thing is, Java will catch it and tell you "Hey, there is a good chance that you'll hit that print with a null".
If you had started with either of these two lines:
String s=null;
String s="";
The compiler couldn't have helped you with that mistake. (It's not likely that you meant to print "", is it?)
The correct fix when you see this "variable might not have been initialized" message is NOT to initialize the string to null or "". It's to actually be sure s is set to a valid value in every possible path:
if(a==5)
s="It was Five";
else if(a==6)
s="It was Six";
else
s="It was something else, who knows?";
This will compile fine, even without initializing s. This works on complex if/else, looping and exception cases, so don't just assume it will only catch trivial cases like this!
So "Best Practice" is to NEVER initialize variables to "", 0 or null. Don't initialize them unless it really makes sense and you are using the value you set it to in some way.
Once you get the error in my example, instead of the else you might just initialize s to "It was something else, who knows?" instead of adding the else--that would be perfectly valid; but by not initializing it to null or "" as a matter of habit, at least it was able to remind you that you had to do so.