Java Intro Interview Questions and Features
Java Intro Interview Questions and Features
1. What is Java?
Microsystems (now owned by Oracle). It follows the principle of "Write Once, Run Anywhere."
Because Java code is compiled into bytecode which can run on any system with a JVM.
Bytecode is the intermediate code generated by the Java compiler. It's platform-independent and
Java is both. Code is compiled to bytecode, then interpreted or compiled by the JVM.
Java is platform-independent and uses automatic memory management. C++ supports pointers and
JVM is a part of the JRE that executes Java bytecode and provides a platform-independent runtime.
9. What is the main method in Java?
It's the entry point of any Java application: public static void main(String[] args)
Simple
Java is easy to learn and removes complex features like pointers and operator overloading.
Object-Oriented
Java supports OOP principles such as Encapsulation, Inheritance, Polymorphism, and Abstraction.
Platform Independent
Java code compiles to bytecode which can run on any device with a JVM.
Secure
Java eliminates pointers, runs in a sandbox, and uses a security manager to define class access.
Robust
Java has strong memory management and exception handling to build reliable applications.
Multithreaded
Java can run multiple threads simultaneously for tasks like gaming and server processing.
Architecture Neutral
Portable
High Performance
JIT compiler helps Java achieve high performance by converting bytecode to native code at runtime.
Distributed
Java supports network-based applications and technologies like RMI and CORBA.