This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes  How many object can a class have? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark " How many object can a class have?" Watch " How many object can a class have?" New topic
Author

How many object can a class have?

Sowm Herur
Ranch Hand

Joined: Jul 07, 2008
Posts: 32

How many object can a class have?
Why do we need to create more than one object of a class as we can only use one object to access different methods of a class?

Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14074
    
  16

In principle, infinitely many. In practice, as many objects as fit into the computer's memory.

To understand what classes and objects are and what the relation between a class and an object is, see Lesson: Classes and Objects in Sun's Java tutorials.

Also see the lessons in Object-Oriented Programming Concepts.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How many object can a class have?
 
Similar Threads
only one SessionFactory Object per application right?
Is it mandatory (request thread).
Junit testing for singleton class
HttpSessnioBindingListener
Getting ServletContext