What would happen on trying to compile and run the following code?
class House
{
public final void MaintainMethod()
{
System.out.println("MaintainMethod");
}
}
public class Building extends House
{
public static void main(String argv[])
{
House h = new House();
h.MaintainMethod();
}
}
Correct Answer: Successful compilation and output of "MaintainMethod" at run time
Explanation:
Note: This Question is unanswered, help us to find answer for this one
More Java MCQ Questions
Java MCQs | Topic-wise