Java_Features_and_Basics
Java_Features_and_Basics
Features of Java
Platform Independent: Java programs are compiled into bytecode, which can run on any
system with a Java Virtual Machine (JVM).
Object-Oriented: Java is based on Object-Oriented Programming principles, which
include encapsulation, inheritance, and polymorphism.
Simple and Easy to Learn: Java has a clear and straightforward syntax, making it
beginner-friendly.
Secure: Java provides a secure environment by eliminating pointer-related issues and
having built-in security features.
Robust: Java includes strong memory management and exception handling capabilities.
Multithreaded: It allows the execution of multiple threads simultaneously, improving
performance.
High Performance: Though not as fast as C++, Java’s Just-In-Time (JIT) compiler ensures
good performance.
Distributed: Java supports distributed computing through technologies like RMI and
EJB.
Dynamic: Java programs can dynamically load classes and support runtime data
modification.
Encapsulation: Bundling data and methods together, restricting direct access to some
components.
Inheritance: Allowing one class to inherit the properties and methods of another.
Polymorphism: Enabling a single interface to represent different types.
Abstraction: Hiding the complex implementation details and showing only the essential
features of an object.
What is Bytecode?
Bytecode is the intermediate code generated by the Java compiler. It is a low-level,
platform-independent set of instructions that the JVM interprets and executes. Bytecode
ensures that Java programs can run on any device with a JVM, making Java platform-
independent.
What is JVM?
The Java Virtual Machine (JVM) is a runtime environment that executes Java bytecode. It
provides platform independence by translating bytecode into machine-specific instructions.
The JVM also includes features like: