Last Updated on March 20, 2022 by Admin 2
Mark works as a Programmer for InfoTech Inc. He develops the following code snippet.
1. public class Header
2. {
3. //code//
4. {
5. System.out.println(“Print the code.”);
6. super.finalize();
7. }
8. }
Which of the following header statements should be placed at line 3 to execute the program
successfully?
- void finalize() throws Exception
- private void finalize() throws Exception
- protected void finalize() throws Throwable
- void finalize() throws Throwable