Posts

Showing posts from June, 2007

Java - Interesting Stuffs

I am just still an admirer and constant learner of JAVA, So here are some interesting stuffs .I will try to constantly update once I come across some interesting things (atleast to me:) ), To resurrect an object(to make the object alive again) instead of reassigning in the object in finalize method "create a clone" Java Object are created in heap while in C++ ,they are created in Stack Object persistence can be done using object serialization and DATA ACCESS OBJECTS(DAO) Making an object alive in finalize method is useful when we use JNI for a c++ class and do it with a "termination condition"(when there is a code to check whether all the object references in the program has been made null) during garbage collection. System.gc() may or may not run finalize() of for the orphans (object that holds no reference) but Runtime.runFinalizersonExit(true) and System.runFinalizersonExit(true) will surely make the objects ready for the garbage collected. Java supports only pa