Question: Which method headers will result in a correct implementation of a finalizer for the following class? Select the two correct answers. (a) void finalize() throws

Which method headers will result in a correct implementation of a finalizer for the following class?

public class Curtain { // (1) INSERT METHOD HEADER HERE { }

Select the two correct answers.

(a) void finalize() throws Throwable

(b) void finalize() throws Exception

(c) void finalize()

(d) protected void finalize() throws Throwable

(e) protected void finalize() throws Exception

(f) protected void finalize()

(g) public void finalize() throws Throwable (h) public void finalize() throws Exception (i) public void finalize()

(j) private void finalize() throws Throwable (k) private void finalize() throws Exception (l) private void finalize()

public class Curtain { // (1) INSERT METHOD HEADER HERE { } } System.out.println("Final curtain"); super.finalize ();

Step by Step Solution

3.44 Rating (154 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

d and g a b c j k and l reduce the visibility of the ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Java Programming 8th Questions!