Google+

165. Java Keywords in Eclipse IDE






What are Keywords ?

In Java, keyword is a reserved word with a predefined meaning. Keywords are also called as Reserved words as they are reserved and cant be used as identifiers for naming variables, classes , methods etc.

Keywords in Java

The table below lists all the keywords (reserved words) in Java -


Even though goto and const keywords are no longer used in Java, they still cannot be used as identifiers for naming variables, classes, methods etc.

Java Keywords in Eclipse IDE highlight in Purple Color

All the Java Keywords are highlighted in different colors in Eclipse IDE

Lets implement this on Eclipse IDE -

1. Launch Eclipse IDE, create a  Java Project 'Project 013' as shown below -


2. Create a new Java Class 'Class013' with main( ) method  in 'Project 013' and observe that few Java Keywords got highlighted in color as shown below -



3. Now write for loop which prints the values from 1 to 10 and observe that a different set of Java Keywords are highlighted in color in Eclipse IDE as shown below -






Please comment below to feedback or ask questions.

Changing Font, Font Style and Font Size of Java Code in Eclipse IDE will be explained in the next post. 






No comments:

Blog Index