What is difference between Class and Object ?

What is difference between Class and Object ?
Object vs class definition

Welcome back friends in this article we will be understanding Class and Object.  What is the Definition of Class and Object in “layman”?
Our YouTube Channel
Class is a Form where you can fill in some information about something. For example, I have created a Google Form. where it has the following fields.

I have created Google Form using the following fields.

The UI Structure of my Google form is below.

layman Java Object definition
layman Java Object definition

The Above google form which I created is about Student Data where I defined three fields. After creating this google form, I can share this form with multiple people. let say, I am sharing this google form with three people those are ram@gmail.com,kishore@hotmail.com,joe@gmail.com

Let say, these three people access and opened the Google Form and filled in their information. At the time of submission, google create three different records on the server-side based on Google form fields. So, Google Form is a source to create three different unique records. In the Java World, Google form is called as Java “Class”. Based on google form Definition, three different records created and each record called “Object“. Each record is one Object.

Using Java class we can tell, how my data structure should look, and based on that class we can create multiple Objects (Records) So, Class is a Design-time which tells how the Object should look at runtime, and Object is  Run time which is the representation of class and it contains some data. The Object holds some data or default data that is called an Object State. 

I hope that now you understand about the Class and Object definition. Now you must understand why people are saying Class is a blueprint of Object and class is a template of Object.

//This is a class definition of Object. How your object should look at runtime.
public class Student { 
    private String name;
    private String mobile;
    private String address
// using class User , I have created new object called suresh. This object
// holds the values(name = suresh , mobile = 38383883, address = 1st Street) This is called as Obejct
// state.
User suresh = new User();
suresh.name = "suresh;
suresh.mobile = "38383883";
suresh.address = "1st Street"
User kesavan = new User();
kesavan.name = "kesavan";
kesavan.mobile = "9383733";
kesavan.address = "2nd Street"
The kesavan object created using User class and it holds differnt data (kesavan,9383733
2nd Street) This is called as object state kesavan.

Please follow our ITGARDEN YouTube channel for Billing System Project development work using Spring Boot. The Project source code absolutely free. This project is very good for those who are looking for real-time project experience in Spring Boot. To understand the Billing System Project code, watch all Billing System related YouTube videos from this link. Click Here
Our YouTube Channel
Please follow me on Medium.com for all billing system related stories and Java-based technical Articles
Note: To find all billing System related stories find “billing system itgarden” in medium.com

Close Menu