/OOPJava

Primary LanguageJava

OOPJava

object oriented programming examples in java-Jboss Google Code In

polymorphism:

compiletime:

Compile time polymorphism is the process of overloading a method. It allows a class to have different methods with the same names.

runtime:

Run time polymorphism is the process of overriding a method. It allows a differnt class to override a method of its parent class with a method of the same name.

encapsulation:

Encapsulation allows a class to hide variables so only methods in the same class can access them. This allows you to have variables in different classes with the same name.

inheritance:

Inheritance allows a subclass to inherit and use methods from its parent or super class. This allows the reuse of the same method in different classes.

abstraction:

Abstraction allows only certain relvant details to be shown to the user. This allows for a reduction in complexity but may not allow the user to see certain parts that may be crucial to understanding a program.