Wednesday, May 7, 2008

Java Interview Questions 25

121. Question: How you can force the garbage collection?
Answer: Garbage collection automatic process and can't be forced.

122. Question: What is OOPS?
Answer: OOP is the common abbreviation for Object-Oriented Programming.

123. Question: Describe the principles of OOPS.
Answer: There are three main principals of oops which are called Polymorphism,
Inheritance and Encapsulation.

124. Question: Explain the Encapsulation principle.
Answer: Encapsulation is a process of binding or wrapping the data and the codes
that operates on the data into a single entity. This keeps the data safe from
outside interface and misuse. One way to think about encapsulation is as a
protective wrapper that prevents code and data from being arbitrarily accessed by
other code defined outside the wrapper.

125. Question: Explain the Inheritance principle.
Answer: Inheritance is the process by which one object acquires the properties of
another object.

No comments:

Useful Information