Java – Object Oriented Programming – Part 1
What is Object Oriented Programming?
• The entire program is visualized as a number of objects interacting with each other.
• An object is a self contained entity that contains attributes(data) and behaviors (functions).
What is Abstraction?
• The process of exposing the relevant details and hiding the irrelevant details is called Abstraction.
What is Encapsulation?
• The process of binding the data and the related functions together in to single unit i.e., “En”+”Capsule”, En=”In a”, Encapsulate=”In a Capsule”.
• Localization of Information of knowledge within an object.
What is Polymorphism?
• Ability to take different forms is called polymorphism.
• Method Overloading is a way to achieve polymorphism.
What is Inheritance?
• The process of deriving base class properties.
• There are 3 types of relationships.
What is Java?
• Java is a very powerful OO programming language developed by Sun Microsystems.
• Widely used for developing Web applications.
• Used for developing Enterprise Applications using the JEE platform.
What are the features of Java?
• Platform Independent.
• Write Once Run Anywhere.
• Built –in security features like absence of pointers.
What are the major difference from c++?
• No pointers.
• No Destructor(only finalize() – Garbage Collector).
• No Multiple Inheritance(only Interface)
What is Java Compiler?
• Source code stored with .java extension.
• Byte code stored with .class extension.
• The hardware processor cannot understand the byte code.
What is JVM?
• JVM(Java Virtual Machine) executes Byte code.
• It is not a real machine, it is just a virtual machine; implemented in software.
• Executes the byte code line by line.
What is Class?
• Is a blue print used to create objects.
• An object is an instance of a class.
• Is a software template that defines the methods and variables to be included in a particular kind of Object.
• A class contains state and behavior.
o State(Member Variables)
o Behavior(Member Methods)