This blog is all about to learn Core Java Interview Programs and Coding tricks to polish your Java Knowledge. If you like the content of this blog please share this with your friends.
Previously we have discussed the Program for
If Super class implements Serializable interface, Then sub classes can be Serializable or not ?
If Super class implements Serializable interface, Then sub classes can be Serializable or not ?
* Garbage Collection help us to free memory from unused objects.
* Garbage Collection is a Deamon Thread which run behind the application , and this thread is started by JVM itself.
* The Garbage Collection can not be forced, though there are few ways by which it can be requested there is no guarantee that these requests will be taken care by JVM.
* In Java There are Two ways to call Garbage Collection , gc() method of Garbage Collection belongs to java.lang package.
1 ) System.gc();
2 ) Runtime.getRuntime().gc();

No comments:
Post a Comment