Which of the following header statements should be placed at line 3 to execute the program successfully?

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
0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments