ExamVeda
Login
Home
51
What will be the output of the following Java program?
class Output 
{
     public static void main(String args[]) 
    {
        double x = 3.1;  
        double y = 4.5;
        double z = Math.max( x, y );
        System.out.print(z);
    }
}
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
52
What will be the output of the following Java code?
class Output
{
    public static void main(String args[])
    {
  Double i = new Double(257.578123456789);  
        float x = i.floatValue();
        System.out.print(x);
    }
}
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
53
What is the return type of Math.random() method?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
54
What is the value of "d" in the following Java code snippet?
double d = Math.round ( 2.5 + Math.random() );
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
55
Which of these is an correct way of defining generic class?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
56
Which of the following is the correct way of implementing an interface A by class B?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
57
Where is String Pool stored?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
58
What will be the output of the following Java program?
class exception_handling 
{
        static void throwexception() throws ArithmeticException 
        {        
            System.out.print("0");
            throw new ArithmeticException ("Exception");
        }
        public static void main(String args[]) 
        {
        try 
        {
            throwexception();
        }
        catch (ArithmeticException e) 
        {
                System.out.println("A");
        }
    }
}
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
59
Which of these keywords is used by a class to use an interface defined previously?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
60
Classes and Methods are stored in which space?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board