iT Portal

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.
o Has-A
o Uses-A
o Is-A

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)

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: