61.
What will be the result of compiling and running the given code?
class A{
      int b=10;
      private A(){
            this.b=7;
      }
      int f(){
            return b;
      }
}
class B extends A{
      int b;
}
public class Test{
      public static void main(String[] args){
            A a = new B();
            System.out.println(a.f());
      }
}

65.
Which statement is true about java?

66.
What is not the use of "this" keyword in Java?

69.
What is true about Class.getInstance()?

70.
What will be the output of the following Java program?
class recursion 
{
    int func (int n) 
    {
        int result;
        result = func (n - 1);
        return result;
    }
} 
class Output 
{
    public static void main(String args[]) 
    {
        recursion obj = new recursion() ;
        System.out.print(obj.func(12));
    }
}

Read More Section(Constructors and Methods)

Each Section contains maximum 100 MCQs question on Constructors and Methods. To get more questions visit other sections.