KEMBAR78
Final JAVA Notes | PDF | Java (Programming Language) | Java Virtual Machine
0% found this document useful (0 votes)
18 views2 pages

Final JAVA Notes

Java is a simple, platform-independent, and object-oriented programming language that emphasizes security and multithreading. It compiles programs into bytecode, which can run on any operating system without modification. The execution process involves compiling the code, verifying it, and then executing it through the Java Virtual Machine (JVM) using an interpreter and Just-In-Time (JIT) compiler.

Uploaded by

majnubhai730
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views2 pages

Final JAVA Notes

Java is a simple, platform-independent, and object-oriented programming language that emphasizes security and multithreading. It compiles programs into bytecode, which can run on any operating system without modification. The execution process involves compiling the code, verifying it, and then executing it through the Java Virtual Machine (JVM) using an interpreter and Just-In-Time (JIT) compiler.

Uploaded by

majnubhai730
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Features of Java

 Simple: Java is very simple and easy to learn. We don’t need prior
knowledge to learn java.
 Platform Independent: If we write a java program it gets converted to byte
code/ class file, this can run on any OS like windows, MacOS, Linux, etc.

ByteCode/ Windows
Java Program Class_file Mac
Linux

 Object oriented: This implements everything in java is an object of class.


Java supports 4 types of OOP principal Abstraction, Inheritance,
Encapsulation, Polymorphism.
 Architecture Neutral: Java program never connects with system
specification, so changes made to OS or system resources will never force
any changes to the java programs.
 Secure: Unlike C/C++, java doesn’t use any pointers except (which stores
the real address) which makes java more secure as it doesn’t give real
address to the user (converted to String). It also uses byte code verifier
which checks the byte code before running a program.
 Multithreading: Thread is sub-process executing multiple threads at some
time is called multithreading which helps to achieve parallelism which
increases the performance.

Execution Phases

Java Program
Simplifier
Class JIT Interpreter
loader
ByteCode/
Class_file Byte code
verifier
Runtime

Description of Diagram

When we write a java program (we ca write program in any editor). We


should call compiler here which checks syntax and semantics error with the help
of command “javac provide_file_name.java”. If compilation is success, we get
byte code or class file which is with the extension “.class”. This process happens
at compile time.
Once we get byte-code we have to call JVM (Java Virtual Machine) with the
help of command “java class_name”. Initially JVM loads all the classes which are
required to execute this program with the help of class loaders. Now byte code
verifier checks the validity and integrity of the byte code before run. Now JIT
(Just in Time Compiler) converts redundant lines of code (similar lines of code)
to one line reducing the length of the code. Interpreter converts every line of
the code to binary line by line.

You might also like