Computer Science, asked by AmeyaShri123, 1 year ago

What is the difference between keywords and reserved words in java.

#CONTENT QUALITY REQUIRED
#SPAM ANSWERS WILL BE DELETED
#ANSWER AS SOON AS POSSIBLE
#ANSWER ONLY IF YOU HAVE KNOWLEDGE
#ICSEIANS PREFERRED

Answers

Answered by Anonymous
1
keywords have a special meaning in a language and are a part of syntax.
rrserve words are words that can not be used as identifier because they are reserved by language

AmeyaShri123: can keywords be used as identifiers?
Anonymous: no
Anonymous: in practise most keywords are reserved words
AmeyaShri123: please give an example.
Answered by siddhartharao77
2
A short note on the difference between keywords and Reserved keywords in Java:

(1) In Java, Keywords are predefined identifiers which have a special meaning and functionalities. These keywords cannot be used for identifiers. Ex: public.

(2) In Java, Reserved words are words that are reserved to use in future.These cannot be used as identifiers. Ex: goto and const.


Hope this helps!

siddhartharao77: :-)
Anonymous: kya
AmeyaShri123: what are boolean and null reserved words?
siddhartharao77: Now I will clarify your doubt. In Java, there are 53 keyword words including 48keywords and 2 reserved words and 3 literals. Here literals mean boolean words(True or false) and Null. Don't worry about Boolean words and Null. Just remember about special keywords that's it.
AmeyaShri123: ok
AmeyaShri123: thanks
Similar questions