Thursday, 2 June 2016

Java

Java
Java is not just a language .
It is platform to develop softwares from a lower level to higher level means a software like calculator to a software like Android .
(Android is Linux base os but the coding is done in java language.) . Java has a huge platform for Application development .
Java has many library for better application development .
Java works on WORA (Write ones and run anywhere) fundamental. Java is developed by the sun Microsystems company .
Java run on any machine bcoz java uses JVM which produces a class file which consist byte code when we run this byte code on any machine which java JVM installed in it ,it converts the byte code into machine code  by which it can run on any platform.
Java Virtual Machine, or JVM as its name suggest is a “virtual” computer that resides in the “real” computer as a software process. JVM gives Java the flexibility of platform independence. Let us see first how exactly Java program is created, compiled and executed.

Java code is written in .java file. This code contains one or more Java language attributes like Classes, Methods, Variable, Objects etc. Javac is used to compile this code and to generate .class file. Class file is also known as “byte code“. The name byte code is given may be because of the structure of the instruction set of Java program. We will see more about the instruction set later in this tutorial. Java byte code is an input to Java Virtual Machine. JVM read this code and interpret it and executes the program.

Java Virtual Machine

Java Virtual Machine like its real counter part, executes the program and generate output. To execute any code, JVM utilizes different components.

JVM is divided into several components like the stack, the garbage-collected heap, the registers and the method area. Let us see diagram representation of JVM.

No comments:

Post a Comment