See More

package oops; public class OOPDocs { /*------------------- OOP(Object Oriented Programming) --------------------- * * 1) class and object * 2) Encapsulation * 3) Inheritance * 4) Polymorphism * 5) Abstraction * a) Abstract class * b) Interface * * --------------- class --------------------- * # use to represent real world things/entity. * # class contains properties and methods. * # class is also known as blueprint/template of object. * # collection/group of objects having similar behaviors. * # its a user defined data types or reference data type. * * syntax : * class class_name{ * * //properties/feature/state/attributes/instance variable * * //methods/function/behaviors/responsibilities/job/procedure * * ] * * -------------- Object --------------------- * # implementation of class * # instance of class is object and Vs. * # object contains instance variable and instance method. * # object allocates memory when it created * syntax : * * class_name objt_name = nee class_name(); * * eg : * A a = new A(); * Fan f = new Fan(); * */ }