Accenture Placement Interview Questions
Accenture Placement Interview Questions
1. public class Base Test { protected void finalize() { System.out.println(“Destroying Base”); } }
public class DerivedTest extends Base Test{ protected void finalize() { System.out.println(“Destroying Derived”); } }
What is output when an instance of DerivedTest is finalized?
Ans: Destroying Derived, Because the method in the subclass overrides the method in the superclass
2. If a matrix of type…
View On WordPress













