JAVA — James Gosling, 1995 at Sun MicroSystems.
Compiler — converts the code written in particular programming language to a code that computer processor uses (machine language — 0 and 1).
Virtual Machine — emulates (process of reproducing the exact copy of a system) the behavior of a particular system — accept the same data, execute the same programs, and achieve the same results as the imitated system.
Javac — compiler that converts java program to byte code (.class files).
JVM — translates instructions (byte code of javac compiler) into hardware specific machine language.
*** java –version — To check whether java is installed on your computer or not.
JDK — Java Development Kit — to write and run java programs
JRE — Java Runtime Environment — to run java programs
Identifier — names used in the program.
Reserved Words — Identifiers that have some meaning/functionality and value defined by the JAVA.
Keywords — represent a functionality.
Literals — represent a value.
Reserved words for data types: (8)
1) byte
2) short
3) int
4) long
5) float
6) double
7) char
8) boolean
Reserved words for flow control:(11)
1) if
2) else
3) switch
4) case
5) default
6) for
7) do
8) while
9) break
10) continue
11) return
Keywords for modifiers:(11)
1) public
2) 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:(6)
1) try
2) catch
3) finally
4) throw
5) throws
6) assert(1.4 version)
Class related keywords:(6)
1) class
2) package
3) import
4) extends
5) implements
6) interface
Object related keywords:(4)
1) new
2) instanceof
3) super
4) this
Void return type keyword:
1) void
Unused 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.
Conclusions :
- All reserved words in java contain only lowercase alphabet symbols.
- New keywords in java are:
- strictfp———–1.2v
- assert————-1.4v
- enum————–1.5v
- In java we have only new keyword but not delete because destruction of useless objects is the responsibility of Garbage Collection.
*** JAVA is case sensitive — It simply means that the case of the letters in your Java programs matter. For example, suppose you decide to create three variables called “SUMMER”, “summer”, and “Summer”. Even though in English we see the variable names as saying the same thing, Java does not. It will treat them all differently.