100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

Unit 1 – Introduction to Object-Oriented Programming (OOP) in Java | Complete Exam Notes

Rating
-
Sold
-
Pages
16
Grade
A
Uploaded on
27-11-2025
Written in
2025/2026

These notes cover Unit 1: Introduction to Object-Oriented Programming (OOP) in Java in a clear, simple, and exam-focused manner. Perfect for B.Tech / BSc / BCA / MCA students. The file includes explanations, examples, diagrams, and solved Java programs exactly as asked in university exams. Topics Covered: Objects and Classes (definition, examples, characteristics) OOP Principles: Abstraction, Inheritance, Polymorphism, Encapsulation JVM, JRE, and JDK with detailed explanation Why Java is platform independent? Bytecode and role of JVM Step-by-step execution of Java programs Types of operators (overview) Primitive vs Non-primitive data types Type Conversion vs Type Casting with examples Difference between Procedural vs Object-Oriented Programming

Show more Read less
Institution
Module










Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
Module

Document information

Uploaded on
November 27, 2025
Number of pages
16
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

Unit I: Introduction to Object Oriented Programming


Q. 1 Explain the following terms

I) Classes
II) Objects
III) Abstraction
IV) Inheritance
V) Polymorphism



Object

• Any entity that has state and behavior is known as an object. For example, a chair, pen, table,
keyboard, bike, etc. It can be physical or logical.
• An Object can be defined as an instance of a class. An object contains an address and takes up
some space in memory. Objects can communicate without knowing the details of each other's
data or code. The only necessary thing is the type of message accepted and the type of response
returned by the objects.

Example: A dog is an object because it has states like color, name, breed, etc. as well as behaviors
like wagging the tail, barking, eating, etc.




Class

• Collection of objects is called class. It is a logical entity.
• A class can also be defined as a blueprint from which you can create an individual object. Class
doesn't consume any space
• A class is a group of objects which have common properties. It is a template or blueprint from
which objects are created. It is a logical entity. It can't be physical.


A class in Java can contain:

o Fields
o Methods
o Constructors
o Blocks
o Nested class and interface




Java notes 1

, Unit I: Introduction to Object Oriented Programming


Inheritance

When one object acquires all the properties and behaviors of a parent object, it is known as
inheritance. It provides code reusability. It is used to achieve runtime polymorphism.




Polymorphism

• If one task is performed in different ways, it is known as polymorphism. For example: to convince
the customer differently, to draw something, for example, shape, triangle, rectangle, etc.
• In Java, we use method overloading and method overriding to achieve polymorphism.
• Another example can be to speak something; for example, a cat speaks meow, dog barks woof,
etc.

Abstraction

Hiding internal details and showing functionality is known as abstraction. For example phone call,
we don't know the internal processing.

Encapsulation

• Binding (or wrapping) code and data together into a single unit are known as encapsulation. For
example, a capsule, it is wrapped with different medicines.
• A java class is the example of encapsulation. Java bean is the fully encapsulated class because
all the data members are private here.



Q. 2 Explain JVM (java virtual machine) and importance of JVM in JRE.

• What is JVM?

JVM (Java Virtual Machine) is an abstract machine that enables your computer to run a Java
program.

When you run the Java program, Java compiler first compiles your Java code to bytecode. Then,
the JVM translates bytecode into native machine code (set of instructions that a computer's CPU
executes directly).




Java notes 2

, Unit I: Introduction to Object Oriented Programming


Java is a platform-independent language. It's because when you write Java code, it's ultimately
written for JVM but not your physical machine (computer). Since JVM executes the Java bytecode
which is platform-independent, Java is platform-independent.




• What is JRE?

JRE (Java Runtime Environment) is a software package that provides Java class libraries, Java
Virtual Machine (JVM), and other components that are required to run Java applications.

JRE is the superset of JVM.




If you need to run Java programs, but not develop them, JRE is what you need.
The components of JRE are as follows:

Deployment technologies, User interface toolkits, Integration libraries, Other base libraries,
Lang and util base libraries,Java Virtual Machine (JVM),


• What is JDK?

JDK (Java Development Kit) is a software development kit required to develop applications in Java.
When you download JDK, JRE is also downloaded with it.

In addition to JRE, JDK also contains a number of development tools (compilers, JavaDoc, Java
Debugger, etc).



• Relationship between JVM, JRE, and JDK.



Q. 3 Why JAVA is known as platform independent language? Explain.

What is a Platform, and What is a Platform-Independent Language?


Java notes 3
£2.70
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached

Get to know the seller
Seller avatar
vedikagavhane

Get to know the seller

Seller avatar
vedikagavhane Sipna College Of Engineering and Technology
Follow You need to be logged in order to follow users or courses
Sold
New on Stuvia
Member since
2 weeks
Number of followers
0
Documents
3
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their exams and reviewed by others who've used these revision notes.

Didn't get what you expected? Choose another document

No problem! You can straightaway pick a different document that better suits what you're after.

Pay as you like, start learning straight away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and smashed it. It really can be that simple.”

Alisha Student

Frequently asked questions