KwickAcademy Course Topics · 5 min · free
Elementary concept of objects and classes
Learn objects and classes in Java: state and behaviour, data members and methods, writing a class, creating objects with new, calling methods. A class is a blueprint; an object is an instance of a class created with new.
Follows the syllabus of: ICSE Class 10 Computer Applications
On screen in this lesson
What is an object?
| An object is a real thing you can identify |
| State: what the object has, its characteristics |
| Behaviour: what the object does |
State and behaviour
| Object | State | Behaviour |
|---|---|---|
| Mobile phone | brand, battery | call, charge |
| Student | name, marks | study, attend |
| Bank account | balance | deposit, withdraw |
| Car | colour, speed | start, brake |
Objects in Java
| State becomes data members, which are variables |
| Behaviour becomes member methods, which are functions |
| An object in software = data + methods together |
What is a class?
| A class is a blueprint or template for objects |
| It lists the data members and methods |
| One class can create many objects |
Class vs object: key terms
| Object: an instance of a class |
| Class: an object factory |
| Class: a user-defined data type |
| Class exists in code; objects exist in memory while running |
Calling a method on an object
| Syntax: objectName.methodName() |
| Example: s.show() makes object s run show |
| This is called message passing between objects |
Quick answers
Pen p = new Pen(); what is p?
An object, an instance of class Pen.
When does an object get memory?
When new runs.
KwickClips from this lesson
Short clips, one idea each. Good for revision the night before.
The full lesson, in text
Hello students, welcome to Kwickprep. A cookie cutter makes many cookies of the same shape. Java works the same way. Today we will learn what objects and classes are, and how to create them.
Look around you. Your pen, your bag and your mobile phone are all objects. An object is a real thing that we can identify separately. The state of an object is what it has, like the colour and price of a pen. The behaviour of an object is what it does, like a pen writing.
Let us see some examples. A mobile phone has a brand and a battery level, and it can make calls and charge. A student has a name and marks, and can study and attend class. A bank account has a balance, and allows deposit and withdraw. A car has a colour and a speed, and it can start and brake.
Java copies this idea from the real world. The state of a real object becomes data members in Java, which are variables. The behaviour becomes member methods, which are blocks of code that do a job. So a software object keeps its data and its methods together, in one unit.
Now, what is a class? A class is a blueprint, or a template, from which objects are made. It describes which data members and which methods every object will have. Just like one cookie cutter makes many cookies, one class can create many objects.
Here is a class named Student. It has two data members: name, which is a String, and marks, which is an int. It has one member method called show, which prints the name. Writing a class does not create any student yet. It only describes what a student will look like.
Your exam uses special words for this relationship, so learn them. An object is called an instance of a class, because it is one real copy made from it. A class is called an object factory, because it produces objects. A class is also a user defined data type, because we create our own type, like Student. The class is written in code, while objects are created in memory when the program runs.
Now let us create an object. The class Pen has one data member, price, which is ten. Inside main, Pen p equals new Pen creates an object. The keyword new sets aside memory for the object, and p refers to it. We reach the data member with a dot, so p dot price. It prints ten.
Here one class makes two objects, p and q. Pen is the blueprint, and new Pen builds each object. We set the price of p to ten. Pause and predict. Does the price of q also become ten? No. Each object has its own copy of the data members, so q keeps its own price.
Objects do work when we call their methods. We write the object name, a dot, and then the method name with brackets. For example, s dot show asks the object s to run its show method. Sending such a request to an object is called message passing.
Let us compare a class and an object. A class is the blueprint, while an object is an instance. A class does not take memory for its data by itself, but an object gets memory when new runs. A class is written once, but we can create many objects. Student is a class, while a student named Riya is an object.
Let us revise what we learned today. An object has state and behaviour. In Java, state becomes data members, and behaviour becomes member methods. A class is a blueprint, an object factory and a user defined data type. An object is an instance of a class, created with the keyword new. And we use a dot to reach members, like p dot price or s dot show.
Courses that teach this
| Course | Unit |
|---|---|
| ICSE Class 10 Computer Applications | Revision of Class IX Syllabus |
Voice-over in this lesson is AI-generated. The script is written and checked by Kajal Ma'am. Boards can revise a syllabus mid-year, so confirm anything you plan around against the official board circular. Keep your passwords, OTPs and ID numbers to yourself — we never ask for them. To reach Kajal Ma'am, use the WhatsApp button; sharing your number there is how we call you back.
Free to watch, no sign-up. Live classes with Kajal Ma'am are the paid course; these lessons stay free either way.


