What is Class and Object in JAVA?

As we know Java is an object oriented language, therefore, we need to know how we can work with objects and find a solution using object oriented programming. For all this, understanding of class and object is important.

So, as we discussed earlier that to find a solution to any problem using object orientation, we need to look at the problem in a different way:

  1.  we need to identify the object in a problem.
  2.  determine the type of object
  3. determine what object has
    what object does

For example, take Audi, BMW, Apple, Banana, Mercedes, Mango as an object.

These objects can be classified in the categories as:

class description


To represent a type of object we need to define Class in JAVA.

The basic requirement to create an object is that a class must exist. In other words, an object in Java can never be created without a class.

A class is a Blueprint using which objects are created.

class -blueprint.jpg

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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

Powered by WordPress.com.

Up ↑

%d bloggers like this: