wood burning stoves*
The moose likes Beginning Java and the fly likes What is Singleton 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 "What is Singleton" Watch "What is Singleton" New topic
Author

What is Singleton

Mansukhdeep Thind
Ranch Hand

Joined: Jul 27, 2010
Posts: 1157

Hi

I am studying garbage collection in Java. It says "the method getRuntime returns a Singleton. we can invoke gc() on this." What is meant by Singleton? What does it mean when we say the current runtime can be obtained from the getRuntime method?


~ Mansukh
Stevens Miller
Ranch Hand

Joined: Jul 26, 2012
Posts: 523
    
    3

What is meant by Singleton?

Mansukhdeep, that's a good question to answer by using Google. Lots of people here know the answer, but you should consider a number of different ways to state it, which you will obtain if you use something like Google. Also, by using Google for a well-defined question that has a straightforward answer, you will find lots of useful Web sites that can help you when you have other questions about Java.
What does it mean when we say the current runtime can be obtained from the getRuntime method?

What's "it"? The getRuntime method returns a Runtime object associated with the current application.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: What is Singleton
 
Similar Threads
Using getRuntime().exec() within EJB
shell and getRuntime
nio and getRuntime()?
getRuntime question
getRuntime().exec() vs cmd prompt