Attributes
name
rollNo
mark
Methods
display()
calculateGrade()
Object-Oriented Programming (OOP) is a programming paradigm that models real-world entities as objects. Java is one of the most popular Object-Oriented Programming languages.
Everything in Java revolves around the concepts of Classes and Objects.
A Class is a user-defined data type that acts as a blueprint for creating objects. It is defined as group of object with similar properties. Class is a generic concept and does not occupy memory space.
An object is an instance of a class.
Objects occupy memory and contain actual values.
| Object | Name | Roll No | Mark |
|---|---|---|---|
| s1 | Anu | 1 | 95 |
| s2 | Rahul | 2 | 88 |
| s3 | Arun | 3 | 76 |