I am new to java and facing a problem with this method getRuntime(); which exists in Runtime class, what this method do? Does it affect Garbage Collection? and when we use it? I need somebody explain to me briefly this method.
I am new to java and facing a problem with this method getRuntime(); which
Share
You call it when you want to use a method on
RuntimeMany of these methods are duplicates in theSystemclass which is simpler to call.You should be able to assume a getter doesn’t create new objects or cause garbage to be created (except perhaps the first time) otherwise its not a plain getter.