• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Please, Is a class an instance of an Object

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please , i need a YES or NO answer and explanation will be so much appreciated ...
Its a class assignment in school
please help me out !
Thanks in advance
 
High Plains Drifter
Posts: 7289
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I believe what the question is trying to test is your understanding of the relationship between classes and objects.

Java is what we call a class-based OOP language. You can think of a class as a template for all the instances that can be constructed from it. The values of the fields in each instance, taken as a whole, are also called the object's state. So if we use classes to make instances (objects), is the answer to your question yes or no? You tell me.
 
Mustafa Segun
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
@Micheal Ernest... i said YES looking at the JAVA view, the Lecturer said NO that i was wrong, so, she gave it as Home Work.
Please help so that i can grab the concept to its fullest and be able to defend it
 
Michael Ernest
High Plains Drifter
Posts: 7289
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok, let's ask it this way so you can defend your answer. One of the following must be true:

In Java, an object is an instance -- that is, a run-time element -- that is made using a class as a template.

In Java, a class is an instance -- that is, a run-time element -- that is made using an object as a template.

It sounds as if you answered that the second must be true. Are you sure that's what you meant? If so, what leads you to believe it?
 
Mustafa Segun
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OH.... i get it now.. A class is definately not an instance of an Object

Thanks so much for the SUPPORT .
Myy Lecturer is right !
I appreciate the help
 
Michael Ernest
High Plains Drifter
Posts: 7289
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
 
Mustafa Segun
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic