right???
but the ultimate memory release done by native OS.
now my confusion is ... when it is called in reality?????
have a look at my code .....
import java.io.*;when i can see the effect of finalize method calling????
class PariTest2
{
protected void finalize()
{
try{
FileWriter out = new FileWriter("d:/deb_web/lis/test_finalize.txt");
out.write("Yahoo ... Finalize method gets called");
out.close();
System.out.println("Yahoo ... Finalize method gets called");
}catch(Exception e){
System.out.println("DMJPRO: Error");
}
}
}
class FinalizeTest
{
public static void main(String a[])
{
System.out.println("Main Thread starts");
new PariTest2();
}
}
plz help.
kind regards.
dmjpro.