ExamVeda
Login
Home
81
Which of these method can set the out stream to OutputStream?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
82
Which of the following constant are defined in Boolean wrapper?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
83
Which of these type parameters is used for a generic class to return and accept any type of object?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
84
What will be the output of the following Java program?
import java.util.*;
public class genericstack  
{
    Stack  stk = new Stack ();
public void push(E obj)
    {
        stk.push(obj);
}
public E pop()
    {
        E obj = stk.pop();
  return obj;
}
}
class Output
{
    public static void main(String args[])
    {
        genericstack  gs = new genericstack();
        gs.push("Hello");
        System.out.print(gs.pop() + " ");
        genericstack  gs = new genericstack();
        gs.push(36);
        System.out.println(gs.pop());
    }
}
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
85
What will be the output of the following Java code?
class Output 
{
    public static void main(String args[])
    {
        Double i = new Double(257.5);  
        boolean x = i.isNaN();
        System.out.print(x);
    }
}
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
86
What will be the output of the following Java code?
class isNaN_output 
{
    public static void main(String args[]) 
    {
        Double d = new Double(1 / 0.);  
        boolean x = d.isNaN();
        System.out.print(x);
    }
}
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
87
What is the range of numbers returned by Math.random() method?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
88
What will be the output of the following Java program?
    package pkg;
    class display 
    {
        int x;
        void show() 
        {
            if (x > 1)
                System.out.print(x + " ");
        }
    }
    class packages 
    {
        public static void main(String args[]) 
        {
            display[] arr=new display[3];
            for(int i=0;i<3;i++)
                arr[i]=new display();
            arr[0].x = 0;      
            arr[1].x = 1;
            arr[2].x = 2;
            for (int i = 0; i < 3; ++i)
                arr[i].show();
         }
    }

Note : packages.class file is in directory pkg;
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
89
What will be the output of the following Java program?
class Output
{
    public static void main(String args[])
    {
        Double i = new Double(257.5);  
        Double x = i.MIN_VALUE;
        System.out.print(x);
    }
}
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
90
Which of these methods loads the specified dynamic library?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board