Home > DeveloperSection > Interviews > What is the difference between undefined value and null value?

Posted on    May-17-2011 2:34 AM

 Cold Fusion Cold Fusion 
 1 Answer(s)
  1376  View(s)
Rate this:

James Smith

Total Post:79

Posted on    May-17-2011 12:00 AM

Undefined value having no keyword and not defined is known as undefined value. While declaring a variable it does not contain any value hence it is called as undefined value. Null value has to be specifically declared as null indicating that the variable doesn’t point at any particular location in memory. For example String str = null; declares variable str which references null.

Don't want to miss updates? Please click the below button!

Follow MindStick