1.

Which concept of Java is achieved by combining methods and attribute into a class?(a) Encapsulation(b) Inheritance(c) Polymorphism(d) AbstractionThis question was posed to me by my school principal while I was bunking the class.Asked question is from Concepts of OOPs topic in section Java Environment & OOPS Concepts of Java

Answer»

Correct option is (a) Encapsulation

The BEST I can explain: Encapsulation is IMPLEMENTED by combining METHODS and attribute into a CLASS. The class acts like a container of encapsulating properties.



Discussion

No Comment Found

Related InterviewSolutions