Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java Keywords

 
Chitra Natarajan
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
In Java null, true, false are keywords or not?
According to Jaworski Mock up exam, above three are not keywords. He has given that valus are not keywords.
But according to Sun's CoreJava book, I found null is a keyword.
Any one can clear my doubt.
thanks in advance.
Also I want to tell one more thing.
In Jaworski Mockup exam one question's answers is wrong. i.e he has given that example of polymorphism is overloading. But as I know the correct answer is overriring.
------------------
Chitra Natarajan
Denver,Co.
USA
E-mail:schithu@yahoo.com
 
KN
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Refer this site for Java Keywords. null, true and false are Java reserved literals.
http://java.sun.com/products/jdk/1.2/docs/api/index.html
 
KN
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh...Actually I mean this site http://java.sun.com/docs/books/tutorial/java/nutsandbolts/_keywords.html

 
Sadashiv Borkar
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,
If you refer JLS (Chapter 3.9) you will find that
null, true and false... are not java reserved keywords but they r Literals
e.g
true and false r boolean literals where as
null is a null literal
 
chetan nain
Ranch Hand
Posts: 159
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
chitra,
i think an example of polymorphism IS overloading. since in overloading, the method name essentially must be the same, we may define various ways of implementation of the same.
which is polymorphism
chetan
 
Vivek Shrivastava
Ranch Hand
Posts: 277
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Me too had this confusion that which one is example of polymorphism. Either overriding or overloading. Initially I had an impression that overriding is example of polymorphism but in some mock exam I found that overloading is example of polymorphism.

I would love to hear from our moderator on this to make sure what is the correct answer?

Please do reply.
vivek
 
Vivek Shrivastava
Ranch Hand
Posts: 277
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am really looking forward to hear from our moderators. please do help here.
tahnks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic