Skip to main content

Java is a programming language developed by Sun Microsystems, the company in which Canadian IT programmer James Gosling was a developer who developed the Java programming language in 1995.

in the year 1991, James Gosling and his Team start a project. Their  Team  name was Green Team and from here Java history began.

Inital name of the java is green talk with file .gt extension, further rename to OAK. Because  OAK  is the national tree of many countries (USA, FRANCE etc.) also there is a company registered with OAK name. So they start searching a unique name which does not exist and one day when they are in Indonesia island they ordered coffee a coffee got an idea to rename OAK  to Java So, he discussed with their team member and they also like this name So,  later renamed to Java with coffee symbol.

The first version of java (JDK1.0) was released on 23 January, 1996.

java is a class based high level programming languge. at starting java programming mainly used for electronic devices(Remote, Setbox, Television) etc. James Gosling want to develop a remote system with which they want to control the device from a single remote.

Latter java has also become popular in the Internet Programming as well. Now a days Java is used to develop Desktop, Web and Mobile applications.

A predefined Java class always starts with a capital letter.

Purpose to develop Java Programming Language

Simple answer WORA(Write Once Run Anywhere).

Flavours of Java

According to the SunMicroSystem java is available in 3 flavors

1. Standard Edition
It is used to develop Standalone applications. It is also known as J2SE,JSE.
Example:Core Java(JSE) mainly used for SOFTWARE.
2. Enterprise Edition
It is used to develop web applications. It is also known as J2EE,JEE. Advanced Java(JEE) mainly used for web apps.
Advanced Java (JEE) mainly used for WEB
3. Micro Edition
Macro edition which is used for developing device programs and mobile applications It is also known as J2ME,JME
Android Java(JME) mainly used for mobiles APP.

Java layers

Java works on 3 basic important layers

1. Presentation layer(controller)
First point of contact.
Example: user interface of the application that presents the application’s features and data to the user.
2. Service layer(main work)
This layer contains the business logic that drives the application’s core functionalities
Application’s core functionalities: Like making decisions, calculations, evaluations, and processing the data passing between the other two layers.
3. data access layer(DAO/Repository layer)
This layer is responsible for interacting with databases to save and restore application data.
databases.

JDK

JDK stands for Java Development Kit provide all the tools to work with java language. inside JDK contains JRE and JVM.

JRE: JRE stands for Java Runtime Envirnment. it provide an envirnment to execute the Java program. it is a kind of compiler and check program sytntax.

it internally contains JVM .

JVM: JVM stands for Java Virtual Machine, it is a software in the form of interpreter written in C language It is used to execute Java program. It basically works after the compiler generates a .class file, then JVM interprete .class file to execute Java program.

Java Program complete execution process

java program always begin with the main function.

execution is done in two steps

Compilation process

Execution process in Detail

Why public static void main(String args[ ])

Rules:

Save:

class_name.java

Compilation:

javac class_name.java

Execution/Run:

java class_name

Features of Java

Frequently Asked Questions

Q1. What is Java?
Java is a class based high level object oriented programming language.
Q2. Why name JAVA?
In the year 1991, James Gosling and his Team start a project. Their Team name was Green Team and from here Java history began. Inital name of the java is green talk with file .gt extension, further rename to OAK. Because OAK is the national tree of many countries (USA, FRANCE etc.) also there is a company registered with OAK name. So they start searching a unique name which does not exist and one day when they are in Indonesia island they ordered coffee a coffee got an idea to rename OAK to Java So, he discussed with their team member and they also like this name So, later renamed to Java with coffee
Q3. Syntax of java comes from which language?
The syntax is mostly derived from C and C++ .
Q4. Why learn Java language?
  1. Simple and easy to learn .
  2. Open source .
  3. Plateform independent .
  4. Secure .
  5. Embeded .
  6. Compiled and intrepreted .
  7. Roboust .
  8. Large library and framworks .
Q5. Is Java compiled or Interpreted?
Java is both compiled and interpreted.
Q6. In which language is a Java compiler written?
The very first Java compiler was written in C by Sun Microsystems with some libraries from C++. But Now a days, The compiler is written in Java and the JVM(runtime) is written in C
Q7. Write once, run anywhere(WORA) means?
Bytecode code can be run in any plateform like windows, linux, mac, mobiles etc.
Q8. What apparoach compiler does follow to execute a program?
Java compiler executes the code from top to bottom.