Monday, November 5, 2012

Encapsulation, Inheritance & Ploymorphism


Points to Remember about Java Encapsulation:

  • With Encapsulation you can hide (restrict access) to critical data members in your code , which improves security
  • Encapsualtion combines data and actions together (just like a capsule).

Inheritance & Ploymorphism points to note:

Inheritance: In simple words , Inheritance is way to define new a class , using classes which have already been defined
Ploymorphism: Is the ability of methods to behave differently , based on the object calling it. “Same interface, different implementation”.

No comments:

Post a Comment