41.
A method within a class is only accessible by classes that are defined within the same package as the class of the method. Which one of the following is used to enforce such restriction?

42.
Choose the correct statement
public class Circle{
      private double radius;  
      public Circle(double radius){
            radius = radius;
      }
}

43.
Choose the correct statement. Restriction on static methods are: I.   They can only call other static methods.
II.   They must only access static data.
III. They cannot refer this or super in any way.

44.
You have the following code in a file called Test.java
class Base{
      public static void main(String[] args){
            System.out.println("Hello");
      }
}
public class Test extends Base{}

What will happen if you try to compile and run this?

45.
What will be the output?
public class Test{
	static{
		int a = 5;
	}

	public static void main(String args[]){
		new Test().call();
	}

	void call(){
		this.a++;
		System.out.print(this.a);
	}
}

46.
Determine Output:
class MyClass{
      static final int a = 20;

      static final void call(){
            System.out.println("two");
      }
	
      static{
            System.out.println("one");
      }
}

public class Test{
      public static void main(String args[]){
            System.out.println(MyClass.a);
      }
}

47.
What is the output for the below code?
public class A{
      static{
            System.out.println("static");
      }

      {
            System.out.println("block");
      }

      public A(){
            System.out.println("A");
      }

      public static void main(String[] args){
            A a = new A();
      }
}

48.
What will be the output?
public class Test{
      public static void main(String[] args){
            String value = "abc";
            changeValue(value);
            System.out.println(value);
      }

      public static void changeValue(String a){
            a = "xyz";
      }
}

50.
What will be the output for the below code?
public class Test{
      static{
            int a = 5; 
      }

      public static void main(String[] args){
            System.out.println(a);
      }
}