REVATURE INTERVIEW ACTUAL TEST FULL
QUESTIONS AND CORRECT ANSWERS
EXAMPREP STUDY SHEET
●● Object
Answer: Any entity that has state and behavior. For example, a chair,
pen, table, keyboard, bike, etc. It can be physical or logical
●● 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.
●● 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 created
, Note: A default constructor is created if class doesn't have any
●● Rules to remember while creating a constructor
Answer: Constructor name must be the same as its class name
A Constructor must have no explicit return type
A Java constructor cannot be abstract, static, final, and synchronized
●● Types of constructors
Answer: Default Constructor
Parameterized Constructor
●● Default Constructor
Answer: is a no-args constructor that the Java compiler inserts on your
behalf
●● Parameterized Constructor
Answer: A constructor which has a specific number of parameters
QUESTIONS AND CORRECT ANSWERS
EXAMPREP STUDY SHEET
●● Object
Answer: Any entity that has state and behavior. For example, a chair,
pen, table, keyboard, bike, etc. It can be physical or logical
●● 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.
●● 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 created
, Note: A default constructor is created if class doesn't have any
●● Rules to remember while creating a constructor
Answer: Constructor name must be the same as its class name
A Constructor must have no explicit return type
A Java constructor cannot be abstract, static, final, and synchronized
●● Types of constructors
Answer: Default Constructor
Parameterized Constructor
●● Default Constructor
Answer: is a no-args constructor that the Java compiler inserts on your
behalf
●● Parameterized Constructor
Answer: A constructor which has a specific number of parameters