Explain java keywords in detail?

What are java keywords?

Java keywords are predefined identifiers which have special meaning .

These keywords are used to communicate with JVM to perform specific task.

They are fifty keywords available in java language.

47 keywords are added in java 1.0.

In java 1.2 strictfp keyword was added.

In  java 1.4 new keyword assert was added.

In java 5 new keyword enum was added.

 

Important points to remember on keywords :

a)    Java keywords cannot be used for identifiers.

b)    Literals such as true,false and null are not keywords.

c)     const and goto are go to are reserved keywords but they don’t have implementation in jdk so they are not used.

Here are the list of keywords available in java:

SNO Identifier
  Java Files
1. class
2. Interface
3. enum
   
  Datatypes
4 byte
5 short
6 int
7 long
8 float
9 double
10 char
11 boolean
12 void
   
  Memory Locations
13 new
14 static
   
  Control Statements
15 if
16 else
17 switch
18 case
19 default
   
  Loop statements
20 while
21 do while
22 for
   
  Transfer statements
23 break
24 continue
25 return
   
  packages
26 import
27 package
   
  Accesibility Modifiers
28 private
29 protected
30 public
   
  Modifiers
31 static
32 final
33 abstract
34 native
35 transient
36 voltaile
37 synchronized
38 strictfp
   
  Objects
39 super
40 this
41 instance of
   
  inheritance
42 extends
43 implements
   
  Exception Handling
44 try
45 catch
46 finally
47 throw
48 throws
   
  Reserved
49 const
50 goto

 

Leave a Reply

Your email address will not be published. Required fields are marked *