aspose file tools*
The moose likes Beginning Java and the fly likes Newb Question... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Newb Question..." Watch "Newb Question..." New topic
Author

Newb Question...

Scott Batchelor
Greenhorn

Joined: Jul 07, 2003
Posts: 11
So a class is the same thing as an object?
Michael Morris
Ranch Hand

Joined: Jan 30, 2002
Posts: 3451
Originally posted by Scott Batchelor:
So a class is the same thing as an object?

Nope. A class is a meta-object or pattern to create objects. Consider a class as you would a recipe. You have to combine the ingredients in the proper quantities and orders and then cook the results appropriately to create the objects (cookies?).
[ July 14, 2003: Message edited by: Michael Morris ]

Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
Maulin Vasavada
Ranch Hand

Joined: Nov 04, 2001
Posts: 1871
also
"Person" is a class as it defines attributes a person can have like,
name, ssn, telephone number etc..
BUT "you" and "me" are "OBJECTS" of that Person class. so if somebody says that "a person should not insult another person" it doesn't point to any specific person but any person in general, right? BUT if we say- "maulin should not insult Scott" then it is meant for specific person instances maulin and scott which are objects.
class just says "which" information is there. object describes "what is the content" of that "which" information you know
Person class will say, it should have a name. Maulin object of that class says Person is maulin. Scott object of that class says, Scott is a person.
hope i didn't ditract you instead of helping...
regards
maulin
Scott Batchelor
Greenhorn

Joined: Jul 07, 2003
Posts: 11
Maulin,
Thanks... that is the clearest explanation I have had yet to date and I see the light.
Thanks Again.
Scott
 
wood burning stoves
 
subject: Newb Question...