What's the best way to define the words “class” and “object” to someone who hasn't used them?

前端 未结 29 659
情话喂你
情话喂你 2020-12-13 05:11

My neighbor is taking \"Intro to Java\", and asked me to help explain a few of the first-day concepts. I realized that since I do this everyday, I don\'t have the beginner\

相关标签:
29条回答
  • 2020-12-13 05:55

    You might find this talk by Guy L. Steele interesting: http://video.google.com/videoplay?docid=-8860158196198824415#

    0 讨论(0)
  • 2020-12-13 05:55

    We can also understand the concept of class and object as: as a class is a template so lets have following two examples: Example 1: a recipe of a cake is a template so its a class and cakes that are made following recipe are the objects. Example 2: A brick maker is a class and bricks are objects

    0 讨论(0)
  • 2020-12-13 05:56

    A class description is like a blueprint for a house. All the houses built from that blueprint are objects of that class. A given house is an instance. A tenant can be a changing variable in the house. An example of a method is the procedure by which the post office sends and receives messages (mail) to the house via its mailbox.

    0 讨论(0)
  • 2020-12-13 05:57

    A java class is the structure or blueprint of an object and object is the instance(memory creation) of a class.

    Example: Car is an object(real world entity). firstly, make the structure or design of a Car it's class and when the design of car, to convert real world Car it's an Object. the Car(object) is working now base behalf of design of a car(class).

    0 讨论(0)
  • 2020-12-13 06:00

    class is a blueprint/template which you use to create objects. An object is an instance of a class.

    0 讨论(0)
提交回复
热议问题