Which language is older — Java or Python?
Python (released in 1991; Java in 1995)
What does JVM stand for?
Java Virtual Machine
Which popular mobile operating system uses Java for app development?
Android
What does “OOP” stand for in Java?
Object-Oriented Programming
What was Java’s original name before it was renamed?
OAK
What is one key difference between Java and C?
Java uses garbage collection; C requires manual memory management.
What is bytecode in Java?
Intermediate code that the JVM executes.
Name one IDE used to write Java programs.
Eclipse / IntelliJ IDEA / NetBeans
What is multithreading in Java used for?
To perform multiple tasks at the same time.
Which company originally developed Java before Oracle?
Sum Microsystem
Which newer language runs on the JVM and is used in Android development?
Kotlin
What famous Java slogan refers to its portability?
Write Once, Run Anywhere
Why is Java a common choice for banking and business applications?
It’s scalable, secure, and well-supported for enterprise-level systems.
What does the JDK include that the JRE does not?
Tools for developing Java programs, like the compiler.
Why did Sun Microsystems decide to make Java open-source in 2006?
To encourage community development and increase adoption.
How does Java’s static typing compare to Python’s dynamic typing?
Java requires variable types to be declared; Python determines types at runtime.
What role does the Java ClassLoader play in portability and security?
It loads Java classes at runtime and isolates different classes, supporting dynamic loading and sandboxing.
How does Java’s platform independence benefit companies with global systems?
They can deploy the same software across multiple OS environments without rewriting code.
Define “encapsulation” in OOP.
Bundling data and methods into one unit (class) and hiding internal details from other code.
Describe one major change or controversy that occurred after Oracle acquired Java.
Oracle’s licensing changes and legal disputes (e.g., with Google) caused concerns in the developer community.
Explain why Java is sometimes considered more secure than C++.
Java has built-in memory safety (no pointers), strong runtime checks, and the JVM adds a security layer, unlike C++ which allows low-level memory manipulation.
How does the JVM help Java run on different operating systems without changing the code?
JVMs are platform-specific but interpret the same bytecode, allowing Java to run identically on any OS with a compatible JVM.
Give an example of a popular web platform or company that relies heavily on Java.
Examples: LinkedIn, Netflix, Amazon – use Java for backend services and large-scale systems.
What’s the difference between an interface and an abstract class in Java?
Interfaces define methods with no implementation (until Java 8+); abstract classes can have both defined and undefined methods.