my dog learned polymorphism*
The moose likes Programming Diversions and the fly likes Write a program that has only 10 object at any time ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Other » Programming Diversions
Bookmark "Write a program that has only 10 object at any time ?" Watch "Write a program that has only 10 object at any time ?" New topic
Author

Write a program that has only 10 object at any time ?

ManojKumar Kumar
Greenhorn

Joined: Feb 14, 2012
Posts: 2

Q- Create a program that has only 10 object at any time ?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41034
    
  43
That's an entirely meaningless question. A JVM that starts up will have allocated thousands of objects before ever executing your code. And if your code allocates just one class library object, that most likely allocates more objects in turn. In other words: you won't know how many objects your code causes to be allocated.


Ping & DNS - my free Android networking tools app
 
Consider Paul's rocket mass heater.
 
subject: Write a program that has only 10 object at any time ?
 
Similar Threads
how many Objects ?
How many objects are created by the following two statements?
Array Data Print Out
"finally block" and "finalize()"
Putting interfaces into objects