What is the finalize method do?
Answer / Rachna Mittal
The 'finalize()' method in Core Java is called by the garbage collector just before an object is about to be destroyed. It allows you to perform any necessary clean-up or release of resources, but keep in mind that it is not guaranteed to be called and should not be relied upon for proper program behavior.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is the difference between JVM and JRE?
hi to all,i have a question on static block. i saved below as test.java class test extends a { static { System.out.println("test static"); } public static void main(String []dfs) { } } class a { static { System.out.println("a static"); } public static void main(String []asdf) { } } o/p as static test static but if i change base class as test class then class test { static { System.out.println("test static"); } public static void main(String []dfs) { } } class a extends test { static { System.out.println("a static"); } public static void main(String []asdf) { } } o/p test static explain me why "a static" wasn't print in second code when it is in derived class
What is use of a abstract variable?
What are encapsulation, inheritance and polymorphism?
Can there be an abstract class with no abstract methods in it?
What is the += operator called?
Can a private method be declared as static?
What is the purpose of garbage collection in java?
Can we have two main methods in a java class?
Can we execute java program without main method?
how to make hashmap object as synchronized object?
program to find 25 square = 625 here the 625 of last two digits is equal to 25, i don't know excatly what this type of number is called