OOPS
Structure of a Java Program
Data Types and Variables
Control Flow Statements
Operators
100

What is the programming paradigm that uses objects and classes

What is Object-Oriented Programming?

100

What is the correct method signature for the Java program’s entry point

What is public static void main (String [] args )?

100

Which data type is used to store true/false values in Java

What is boolean ?

100

Which keyword is used to exit a loop prematurely

What is break?

100

Which operator is used to compare two values for equality

What is ==?

200

This OOP principle is about hiding internal details and showing only essential information.

What is Abstraction?

200

What symbol is used to add single-line comments in Java

What is //

200

What is the default value of an int variable in Java

What is 0?  

200

Which loop will always execute at least once

What is do-while loop?

200

What is the result of 7 % 3 in Java

What is 1?

300

Which keyword in Java is used to inherit a class

What is extends?

300

Java source files are compiled into files with what extension

What is .class?

300

How many bytes are used by the float data type in Java

What is 4 bytes?  

300

Which statement allows skipping the current iteration in a loop

What is continue?

300

What type of operator is && in Java

What is a logical AND operator?

400

This OOP feature allows the same method to perform different tasks based on the object

What is Polymorphism?

400

What keyword is used in Java to define a constant value

What is final?

400

What type is String in Java — primitive or reference

What is reference type?

400

Which loop type is best for reading array

What is for-each loop?

400

Which operator in Java is used for conditional assignment

What is the ternary operator ( ?: )?

500

Encapsulation is implemented in Java using what two features

What are classes and access modifiers?

500

What kind of arguments does the main method accept

What is an array of strings (String[] args)?

500

Which keyword ensures a variable's value cannot be changed once assigned

What is final?

500

In a switch statement, which keyword is used to exit the structure

What is break?

500

Which operator is used for bitwise AND in Java

What is &?