GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  J2EE  >  Core Java
Go To First  |  Previous Question  |  Next Question 
 Core Java  |  Question 483 of 493    Print  
Null keyword
Is null a keyword? if not what is it?


  
Total Answers and Comments: 7 Last Update: September 14, 2008     Asked by: gkumawat 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: interviewprep9
 
Capital N, Null is not a keyword or a reserved word.

All small letters, null is not a keyword either. but, it's a reserved word. you cannot use null as follows:

String null = "a";

null means that a reference is not pointing to any object.


Above answer was rated as good by the following members:
timmireddy
June 14, 2008 13:47:17   #1  
interviewprep9 Member Since: June 2008   Contribution: 10    

RE: Null keyword
Capital N, Null is not a keyword or a reserved word.

All small letters, null is not a keyword either. but, it's a reserved word. you cannot use null as follows:

String null = "a";

null means that a reference is not pointing to any object.

 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
June 15, 2008 08:39:14   #2  
vegetto Member Since: June 2008   Contribution: 10    

RE: Null keyword
Null is not a keyword but

null is a keyword but it is not a good programming practise that u use variavles that

may be close to some keywords .

Null is a variable that can hold any of the value;
while  null means nothing or empty;
it is used to specify the objects that do not point anything
eg:
Myclass ob=null; //null object
or String s1=null;

 
Is this answer useful? Yes | NoAnswer is useful 0   Answer is not useful 1Overall Rating: -1    
June 16, 2008 16:45:42   #3  
Uma Sundar Member Since: June 2008   Contribution: 2    

RE: Null keyword
Null is not a keyword.Null is a default value for all type of reference variables.Null means "nothing" in a specified variable.
 
Is this answer useful? Yes | No
June 25, 2008 06:04:54   #4  
s.sachin11 Member Since: June 2008   Contribution: 1    

RE: Null keyword
"null" is not a keyword, but a special literal of the null type. It can be cast to any reference type, but not to any primitive type such as int or boolean. The null literal doesn't necessarily have value zero. And it is impossible to cast to the null type or declare a variable of this type.
 
Is this answer useful? Yes | No
July 17, 2008 06:55:57   #5  
timmireddy Member Since: May 2008   Contribution: 11    

RE: Null keyword
Null is not a keyword, but this is a special string literal of null type, means there is no specific use of null.If u use null as an reference it won't work, JVM shows it's not a statement.
 
Is this answer useful? Yes | No
August 03, 2008 01:43:43   #6  
er.mukesh_208 Member Since: May 2008   Contribution: 3    

RE: Null keyword
null is neither keyword nor any special literial. It is only a reserved word.
 
Is this answer useful? Yes | No
September 13, 2008 09:14:03   #7  
varmasuman Member Since: September 2008   Contribution: 1    

RE: Null keyword
Null means showing nothing

Whenever one object reference refers null i.e

  ServletConfig application=null;

Then there is nothing in the object reference application.

 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
Sponsored Links

 




About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape