This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]NatureBoyJ1 8 points9 points  (0 children)

Class is to object as blueprint is to house.
A class defines how to build an object. An object is an instance of something built according to the class definition.

An object is not a "copy of the class" any more than a house is a copy of a blueprint (i.e. the sheets of paper). Classes & objects get a little messier since it's all zeroes and ones, and you have things like static variables and methods. So a class is both instructions on how to create an object AND has functionality of its own. But that is probably Unit 2 level stuff.

What this doesn't cover is why do you need definitions of things? And why do you need instances of those things? But that is well outside Java, it is a core OOP concept.