DAY4 object and class definition in java

today i lead in the class is how object and class work in the java programing language.

step 1:

   first we are going to seen how object is work in java programing 

Enter fullscreen mode Exit fullscreen mode

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

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

  • They are physical entities.

  • Objects are created using the “new” keyword”.

  • It consumes some memory space.

  • We are create object as many time as we want according to our requirements.

STEP 2:

   now we are going to see is  how class work in java programming language.

Enter fullscreen mode Exit fullscreen mode

  • A class is a collection of similar types of objects. Classes are composed of names,attriubutes,and methods.

  • A class is know 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.

AND THIS ARE THE TOPI I LEARD FOR THE WED SITE

原文链接:DAY4 object and class definition in java

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

请登录后发表评论

    暂无评论内容