ExamVeda
Login
Home
61
How to use environment properties in the class?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
62
What will be the output of the following Java program?
class Output 
{
    public static void main(String args[])
    {
  String str = "true false";
        boolean x = Boolean.parseBoolean(str);
        System.out.print(x);
    }
}
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
63
What will be the output of the following Java code?
import java.io.*;
class files 
{
    public static void main(String args[]) 
    {
        File obj = new File("/java/system");
        System.out.print(obj.getName());
    }
}
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
64
Which of these is a super class of wrappers Byte and short wrappers?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
65
What will be the output of the following Java program?
class exception_handling 
{
    public static void main(String args[]) 
    {
        try 
         {
            int a = 1;
            int b = 10 / a;
            try 
            {
                 if (a == 1)
                     a = a / a - a;
                 if (a == 2) 
                 {
                     int c[] = {1};
                     c[8] = 9;
                 }
            finally 
            {
                System.out.print("A");
            }

        }
        catch (NullPointerException e) 
        {
                System.out.println("B");
        }
    }
}
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
66
Which of these access specifiers can be used for an interface?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
67
What will be the output of the following Java program?
import java.lang.reflect.*;
class Additional_packages
{	 
     public static void main(String args[])
     {
   try
         {
       Class c = Class.forName("java.awt.Dimension");
 Constructor constructors[] = c.getConstructors();
 for (int i = 0; i < constructors.length; i++)
     System.out.println(constructors[i]);
   }
   catch (Exception e)
         {
               System.out.print("Exception");
         }
    }
}
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
68
Which of the following package stores all the standard java classes?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
69
What type of methods an interface contain by default?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
70
Which of these exceptions is thrown by compareTo() method defined in a double wrapper?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board