• Post Reply Bookmark Topic Watch Topic
  • New Topic

How many object can a class have?  RSS feed

 
Sowm Herur
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Sheriff
Posts: 16007
87
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!