What is Java?
Java is a high-level, class-based, object-oriented programming language developed by Sun Microsystems in 1995 (now maintained by Oracle). It is designed to be platform-independent by compiling source code into bytecode that can run on any device with a Java Virtual Machine (JVM).
What are the main features of Java?
- Platform Independence: “Write once, run anywhere” using the JVM.
- Object-Oriented: Promotes modular and reusable code.
- Secure and Robust: Features like strong memory management and exception handling.
- Multithreaded: Supports concurrent execution.
- Automatic Garbage Collection: Manages memory automatically.
- High Performance: Achieved through the Just-In-Time (JIT) compiler.
- Distributed Computing Support: Includes libraries for networking and RMI.
Is Java a compiled or interpreted language?
Java is both. It is compiled into bytecode using the javac
compiler, and then that bytecode is interpreted (or JIT compiled) by the JVM at runtime.