What is the best practice for initializing a String method (local) variable to avoid the \"Variable might not have been initialized\" error in Java?
String s=null; or St
I prefer to initialize a String in Java as "", purely because I try to avoid null pointers. Null pointers add a lot of overhead that can be removed by assigning "" instead of null.