REVATURE INTERVIEW
COMPREHENSIVE STUDY GUIDE 2026
FULL QUESTIONS AND SOLUTIONS
GRADED A+
◍ Object-Oriented Programming.
Answer: is a methodology or paradigm to design a program using classes
and objects. It simplifies the software development and maintenance by
providing some concepts
◍ What is the output of the Java Code snippet?int a = 260;byte b=
(byte)a;System.out.println(b);.
Answer: 4
◍ Object.
Answer: Any entity that has state and behavior. For example, a chair, pen,
table, keyboard, bike, etc. It can be physical or logical
◍ What is the output of the Java code snippet?byte b = 25;b++;b =
b+1;System.out.println(b);.
Answer: Compiler error
◍ Class.
Answer: in the context of Java, are templates that are used to create objects,
and to define object data types and methods
◍ Advantages of OOPs over Procedure Oriented Programming.
Answer: OOPs makes development and maintenance easier whereas in a
procedure-oriented programming language it is not easy to manage if code
grows as project size increases.
◍ What is a Widening Type Conversion in Java?.
, Answer: Conversion of data from lower data types to higher data types
◍ What are the Type Conversions available in Java Language?.
Answer: Narrowing Type ConversionAndWidening Type Conversion
◍ Constructor.
Answer: It is called when an instance of the object is created, and memory is
allocated for the object
◍ When is a constructor called?.
Answer: When an object is createdNote: A default constructor is created if
class doesn't have any
◍ What will be the output of the following Java Programmingclass Output {
public static void main(String args[]) { int arr[] = {1, 2, 3, 4, 5}; for ( int i =
0; i < arr.length - 2; ++i) System.out.println(arr[i] + " "); } }.
Answer: 1 23
◍ Chose the correct answer...class Output { public static void main(String
args[]) { int arr[] = {1, 2, 3, 4, 5}; for ( int i = 0; i < arr.length - 2; ++i)
System.out.println(arr[i] + " "); } }.
Answer: 256 0
◍ Rules to remember while creating a constructor.
Answer: Constructor name must be the same as its class nameA Constructor
must have no explicit return typeA Java constructor cannot be abstract,
static, final, and synchronized
◍ Types of constructors.
Answer: Default ConstructorParameterized Constructor
◍ What is the range of data types short in Java?.
Answer: -128 to 127
◍ Default Constructor.
Answer: is a no-args constructor that the Java compiler inserts on your
behalf
◍ Parameterized Constructor.
COMPREHENSIVE STUDY GUIDE 2026
FULL QUESTIONS AND SOLUTIONS
GRADED A+
◍ Object-Oriented Programming.
Answer: is a methodology or paradigm to design a program using classes
and objects. It simplifies the software development and maintenance by
providing some concepts
◍ What is the output of the Java Code snippet?int a = 260;byte b=
(byte)a;System.out.println(b);.
Answer: 4
◍ Object.
Answer: Any entity that has state and behavior. For example, a chair, pen,
table, keyboard, bike, etc. It can be physical or logical
◍ What is the output of the Java code snippet?byte b = 25;b++;b =
b+1;System.out.println(b);.
Answer: Compiler error
◍ Class.
Answer: in the context of Java, are templates that are used to create objects,
and to define object data types and methods
◍ Advantages of OOPs over Procedure Oriented Programming.
Answer: OOPs makes development and maintenance easier whereas in a
procedure-oriented programming language it is not easy to manage if code
grows as project size increases.
◍ What is a Widening Type Conversion in Java?.
, Answer: Conversion of data from lower data types to higher data types
◍ What are the Type Conversions available in Java Language?.
Answer: Narrowing Type ConversionAndWidening Type Conversion
◍ Constructor.
Answer: It is called when an instance of the object is created, and memory is
allocated for the object
◍ When is a constructor called?.
Answer: When an object is createdNote: A default constructor is created if
class doesn't have any
◍ What will be the output of the following Java Programmingclass Output {
public static void main(String args[]) { int arr[] = {1, 2, 3, 4, 5}; for ( int i =
0; i < arr.length - 2; ++i) System.out.println(arr[i] + " "); } }.
Answer: 1 23
◍ Chose the correct answer...class Output { public static void main(String
args[]) { int arr[] = {1, 2, 3, 4, 5}; for ( int i = 0; i < arr.length - 2; ++i)
System.out.println(arr[i] + " "); } }.
Answer: 256 0
◍ Rules to remember while creating a constructor.
Answer: Constructor name must be the same as its class nameA Constructor
must have no explicit return typeA Java constructor cannot be abstract,
static, final, and synchronized
◍ Types of constructors.
Answer: Default ConstructorParameterized Constructor
◍ What is the range of data types short in Java?.
Answer: -128 to 127
◍ Default Constructor.
Answer: is a no-args constructor that the Java compiler inserts on your
behalf
◍ Parameterized Constructor.