Skip to main content

Posts

Showing posts from January, 2016

MCQ Test-1

MCQ Test Series Test-1 -------------------------------------------------------------------------------------- 1. Which of the following is FALSE about the Singleton Class? A. It provides the private constructor only. B. It provides a static factory method to return the instance of the class. C. It provides a public static reference of the same class type. D. None of These 2. What will be the output:   class Continue {      public static void main(String args[]){            for(int i=0; i<5; i++) {                         System.out.print(i + " ");                         if (i%2 == 0) continue;           ...

Determine the Output of the following Programs:

class Test {    Test(int a, double l)     {         System.out.println("First");     }    Test(int a, float l)     {         System.out.println("Second");     }    public static void main(String [] rk)     {         Test t = new Test(4, 5);     } } --------------------------------------------------------------------- class Test {    Test(int a, long l)     {         System.out.println("First");     }    Test(int a, float l)     {         System.out.println("Second");     }    public static void main(String [] rk)     {         Test t = new Test(4, 5);     } }