What is Java?
Programming language
Coffee brand
Operating system
Database management system
What is the main purpose of Java?
Web development
Desktop application development
Mobile app development
Cross-platform programming
What is a class in Java?
Object that defines properties and methods
Basic data type
Conditional statement
Looping statement
What is an object in Java?
Instance of a class
Primitive data type
Relational operator
Bitwise operator
What is the syntax for creating an object in Java?
new ClassName()
create ClassName()
object ClassName()
make ClassName()
What is inheritance in Java?
Mechanism for reusing code
Data structure for storing objects
Method for sorting arrays
Function for calculating math expressions
What is a constructor in Java?
Method for creating objects
Data type for storing strings
Conditional statement
Looping statement
What is encapsulation in Java?
Hiding implementation details from the user
Process of defining a class hierarchy
Process of creating new objects
Process of inheriting properties from a parent class
What is a method in Java?
Block of code that performs a specific task
Data structure for storing elements
Keyword for creating loops
Keyword for creating conditional statements
What is the name of Java's package manager?
What keyword is used to define a constant in Java?
What is the default value of a boolean variable in Java?
What is the name of Java's built-in testing framework?
What is the name of the Java virtual machine's just-in-time (JIT) compiler?
HotSpot
JRockit
OpenJ9
GraalVM
What is the name of Java's built-in serialization mechanism?
Java Serialization
Gson
Jackson
Protobuf
What is the name of the method used to start a Java thread?
What is the name of the design pattern used to create objects without using a constructor?
Factory
Singleton
Builder
Prototype
What is the name of the keyword used to create a subclass in Java?
extends
implements
abstract
super
What is the name of the method used to read input from the console in Java?
Scanner.nextLine()
System.in.read()
BufferedReader.readLine()
Console.read()
What is the name of the design pattern used to decouple an abstraction from its implementation?
Bridge
Decorator
Adapter
Facade
What does JDK stand for?
Java Development Kit
Java Debugging Kit
Java Deployment Kit
Java Database Kit
What is the purpose of a constructor?
Object initialization
Exception handling
Code debugging
Memory management
What is a static method?
Method that belongs to the class
Method that belongs to an object
Method that can be overridden
Method that can be abstract
What is the difference between an abstract class and an interface?
Abstract class can have method implementations, interface cannot
Interface can have method implementations, abstract class cannot
Abstract class can be instantiated, interface cannot
Interface can be extended, abstract class cannot
What is the difference between equals() and == in Java?
equals() compares the values of objects, == compares the references
equals() compares the references of objects, == compares the values
equals() is used for primitive types, == is used for objects
equals() is used for objects, == is used for primitive types
What is a try-catch block used for?
Exception handling
Object instantiation
Variable declaration
Code optimization
What is the purpose of the final keyword?
Prevent modification of values or methods
Indicate a method can be overridden
Indicate a class cannot be extended
Indicate a variable cannot be initialized
What is the purpose of the keyword this?
Refer to the current object
Refer to the superclass object
Refer to a method parameter
Refer to a local variable
25 out of 28
ReplyDelete