ExamVeda
Login
Home
61
How many bits are used for generating random numbers?
Discuss
Answer & Solution
Answer: Option C
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[])
     {
         char a[] = {'a', '5', 'A', ' '};   
         System.out.print(Character.isDigit(a[0])+ " ");
         System.out.print(Character.isWhitespace(a[3])+ " ");
         System.out.print(Character.isUpperCase(a[2]));
    }
}
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
63
Which of these methods is called when observed object has changed?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
64
Which of these class allows us to get real time data about private and protected member of a class?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
65
Which of the following is not a memory classification in java?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
66
What will be the output of the following Java program?
public class BoxDemo 
{
    public static <U> void addBox(U u, 
    java.util.List<Box<U>> boxes) 
    {
       Box<U> box = new Box<>();
       box.set(u);
       boxes.add(box);
    }
    public static <U> void outputBoxes(java.util.List<Box<U>> boxes)
    {
        int counter = 0;
        for (Box<U> box: boxes) 
        {
            U boxContents = box.get();
            System.out.println("Box #" + counter + " contains [" + boxContents.toString() + "]");
            counter++;
        }
    }        
    public static void main(String[] args)
    {
        java.util.ArrayList<Box<Integer>> listOfIntegerBoxes = new java.util.ArrayList<>();
        BoxDemo.<Integer>addBox(Integer.valueOf(10), listOfIntegerBoxes);
        BoxDemo.outputBoxes(listOfIntegerBoxes);
    }
}
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
67
What will be the output of the following Java program?
class X
{
    int a;
    double b;
}
class Y extends X 
{
int c;
}
class Output 
{
    public static void main(String args[]) 
    {
        X a = new X();
        Y b = new Y();
        Class obj;
        obj = b.getClass();
        System.out.print(obj.getSuperclass());
    }
}
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
68
Which of these methods of Character wrapper can be used to obtain the char value contained in Character object.
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
69
Which class loader loads jar files from JDK directory?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
70
What will be the output of the following Java code snippet?
int a = random.nextInt(15) + 1;
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board