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

前端 未结 29 819
情话喂你
情话喂你 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: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.

提交回复
热议问题