aspose file tools*
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
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: 14156
    
  19

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
 
wood burning stoves
 
subject: How many object can a class have?