INTRODUTION OF Java:
- Java is an
High level programming language. - Java is also known as
compilerprogramming language. -
It is Statically data type(stric conditons)
When java was invented?
The project began in
June 1991,The language was initially called"Oak".It was later renamed to
"Java" in 1995.Java was designed byJames Gosling at Sun Microsystems.Java 1.0, was released on January 23, 1996.
Java SE 17: Released on September 14, 2021.(latest version of java)
why java?
- In C++ the programming was difficult in multiple platforms, And it has
platform dependency. - To over come this situation, Java has been invented. Java is know for faster efficiency.
JAVA ARCHITECTURE:
JDK (Java Development Kit) is the complete package for Java development. It includes:
JRE (Java Runtime Environment)
- Development tools like
javac (compiler), javadoc, jar, and debuggers. Developers use JDK to write, compile, and debug Java programs. - It is
platform-dependent, with separate builds for Windows, Linux, and macOS.
JRE (Java Runtime Environment) is meant for running Java applications. It contains:
JVM (Java Virtual Machine)
- Core libraries and supporting files. It cannot compile code; it only provides the
runtime environment to execute precompiled bytecode. - JVM (Java Virtual Machine) is the execution engine that converts
Java bytecode into machine-specific instructions. Key responsibilities:
- Class loading (via ClassLoader)
- Bytecode verification for security
- Execution (interpretation or JIT compilation)
Memory management and garbage collection JVM is platform-dependent in implementation but executes platform-independent bytecode.
JIT (Just-In-Time Compiler) is a component of the JVM designed to improve performance.
Instead of interpreting all bytecode, JIT compiles frequently used bytecode sequences into native machine code at runtime, caching them for reuse. Optimizations include:
Register allocation
Eliminating redundant expressions
Reducing memory access This results in faster execution while maintaining JVM’s portability and safety.
How to create and execute java file:

Example:
public class Home{
public static void main( String args[]){
System.out.println("hello");
}
}
OUTPUT:
hello

Top comments (0)