Organizational Research By

Surprising Reserch Topic

Experts Most Trusted Topic


difference between null and empty java string


difference between null and empty java string  using -'java,string,null,equals,referenceequals'

What is the difference between null and the "" (empty string)?

I have written some simple code like this:

String a = "";
String b = null;

System.out.println(a==b); // false
System.out.println(a.equals(b)); // false


And both statements return false. It seems, I am not able to find what is the actual difference between them.
    

asked Oct 19, 2015 by r3tt
0 votes
10 views



Related Hot Questions



Government Jobs Opening


...