Java is a high-level, class-based, object-oriented programming language that is designed to have as few implementation dependencies as possible.
Who developed Java, and when was it released?
Java was developed by James Gosling at Sun Microsystems and released in 1995.
What is the Java Virtual Machine (JVM)?
The Java Virtual Machine (JVM) is an engine that provides a runtime environment to drive Java applications or applets.
What are the main features of Java?
Some main features of Java include object-oriented, platform-independent, simple, secure, and multi-threaded.
What does platform-independent mean in Java?
Platform-independent means Java programs can run on any device or operating system having the Java Virtual Machine (JVM).
What is bytecode?
Bytecode is the compiled format for Java programs. Once a Java program is compiled, it is transformed into bytecode, which is platform-independent.
Explain the term 'class' in Java.
In Java, a class is a blueprint from which individual objects are created. It contains methods and variables.
What is an object in Java?
An object is an instance of a class. It contains states and behaviors defined by the class.
What is inheritance in Java?
Inheritance is a feature in Java where one class acquires the properties and behavior of another class.
What is encapsulation in Java?
Encapsulation is a concept where the data (variables) and code (methods) are bound together to keep them safe from outside interference.
What is polymorphism in Java?
Polymorphism in Java is the ability of a method to exist in multiple forms - specifically method overloading and method overriding.
Explain method overloading.
Method overloading is a feature that allows a class to have more than one method having the same name, if their parameter lists are different.
Explain method overriding.
Method overriding means defining a method in a subclass that has the same name and parameters as a method in the superclass.
What is an interface in Java?
An interface in Java is a reference type, similar to a class, that can contain only constants, method signatures, default methods, static methods, and nested types.
What is the main method in Java?
The main method is the entry point of any Java program. The syntax is public static void main(String[] args).