Object & class definition in java…

Object

An object is a real-world entity that is used for unique representation. It has a certain behavior, state, and identity.

An object is known as an “instance of a class”.

They are physical entities.

Objects are created using the “new” keyword.

It consumes some memory space.

create objects as many times as we ecording to our requirements.

Class

A Class is a collection of similar types of objects. Classes are composed of names, attributes, and methods.

A class is known as “a blueprint of an object”

They are logical entities.

Classes are created using the “class” keyword.

It does not occupy any memory space.

We can create a class only once.

原文链接:Object & class definition in java…

© 版权声明
THE END
喜欢就支持一下吧
点赞12 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容