Java is a popular third generation programming language. It is both a programming language and a platform. The language started as a project code-named Green, and was originally named Oak.
The program written by a programmer is called source code. The process of converting source code into machine code is called compilation. A compiler translates the program all at once. An interpreter translates it line-by-line.
Bytecode is a machine instruction for a Java processor chip called JVM (Java Virtual Machine). It is independent of the computer system it has to run upon. Java programs are compiled into bytecode, which is then interpreted by an interpreter known as JVM.
JVM combined with Java APIs makes Java platform. The Java API (Application Programming Interface) are libraries of compiled code that can be used in our programs.
Characteristics of Java:
a) WORA (Write Once Run Anywhere).
b) Light weight code.
c) Safe and secure.
d) Built-in graphics.
e) Object-oriented language.
f) Supports multimedia.
g) Platform independent.
h) Open product.
The main() method is where the application begins executing. It is contained in a class, known as initial class. In a Java program, there can be many classes, but only one initial class.
Types of Java programs:
a) Internet Applets: It runs within a web browser.
b) Standalone applications: It can run on any platform.