What are Encapsulation, Polymorphism and Inheritance?

Answer Posted / sakthi k

Wrapping of data and functions together is known as
Encapsulation. Eg: Capsule.


Ability of an object to take more than one form is known as
polymorphism.
Two types of polymorphism are availabe
Compile time
Run time

The process of acquiring the base class property is known
as Inheritance

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How is Object Oriented Programming different from Procedure Oriented Programming?

595


Explain the importance of import keyword in java?

527


When can we say that threads are not lightweight process in java?

595


What is the purpose of static methods and variables?

533


Does importing a package imports its sub-packages as well in java?

554






Difference between linkedlist and arraylist.

593


Can we inherit a class with private constructor?

576


How do you define a set in java?

515


What is volatile data type?

552


public class Test { public static void main(String[] args) { int countA = 0; int countB = 0; int countC = 0; int countD = 0; int countE = 0; int countF = 0; int countG = 0; int countH = 0; int countI = 0; int countJ = 0; int countK = 0; int countL = 0; int countM = 0; int countN = 0; int countO = 0; int countP = 0; int countQ = 0; int countR = 0; int countS = 0; int countT = 0; int countU = 0; int countV = 0; int countW = 0; int countX = 0; int countY = 0; int countZ = 0; } } Can anybody tell me any alternate solution(like loop or something) to automate this initialization process. Ex:- for(char chr='A';chr<='Z'; chr++) { (int) String "count"+chr = 0; }

1849


Can we use return in constructor?

497


Can java object be locked down for exclusive use by a given thread?

586


enlist some features of jdk.

562


What is constructor chaining and how is it achieved in java?

573


What is the difference between interface & abstract class?

561