KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
What is the difference between a null string ( String s = null ) and an empty string ( String s = "" )? This is what I have: String s1 = ""; //print statement does not print any thing for s1 but s1.length()=0 String s2 = null;//print statement prints "null" for s2 but s2.length() gives exception What does it mean?
Tags (comma-separated)
Save Edits
Cancel