Reserved words for data types:
1) byte2) short
3) int
4) long
5) float
6) double
7) char
8) boolean
Reserved words for flow control:
1) if2) else
3) switch
4) case
5) default
6) for
7) do
8) while
9) break
10) continue
11) return
Keywords for modifiers:
1) public2) private
3) protected
4) static
5) final
6) abstract
7) synchronized
8) native
9) strictfp(1.2 version)
10) transient
11) volatile
Keywords for exception handling:
1) try2) catch
3) finally
4) throw
5) throws
6) assert(1.4 version)
Class related keywords:
1) class2) package
3) import
4) extends
5) implements
6) interface
Object related keywords:
1) new2) instanceof
3) super
4) this
Void return type keyword:
If a method won’t return anything compulsory that method should be declared with the void return type in java but it is optional in C++.
1) voidUnused keywords:
goto: Create several problems in old languages and hence it is banned in java.
Const: Use final instead of this. By mistake if we are using these keywords in our program we will get compile time error.
Reserved literals:
1) true values for boolean data type.2) false
3) null----------------- default value for object reference.
Prev‹ ›Next
Tags
Core Java tutorials