ExamVeda
Login
Home
31
Which of these is a wrapper for simple data type float?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
32
What will be the output of the following Java code?
class Output
{
    public static void main(String args[])
    {
        Double i = new Double(257.578);  
        int x = i.intValue();
        System.out.print(x);
    }
}
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
33
What will be the output of the following Java code?
class A 
{
     int x;
     int y;
     void display() 
     {
          System.out.print(x + " " + y);
     }
}
class Output 
{
     public static void main(String args[]) 
     {
         A obj1 = new A();
         A obj2 = new A();
         obj1.x = 1;
         obj1.y = 2;
         obj2 = obj1.clone();
         obj1.display();
         obj2.display();
     }
}
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
34
What will be the output of the following Java code?
class Output 
{
     public static void main(String args[]) 
     {
         double x = 3.14;  
         int y = (int) Math.abs(x);
         System.out.print(y);
     }
}
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
35
Which of these methods of Byte wrapper can be used to obtain Byte object from a string?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
36
What will be the output of the following Java program?
class newthread implements Runnable 
{
Thread t;
    newthread() 
    {
        t = new Thread(this,"New Thread");
        t.start();
}
public void run()
    {
        t.setPriority(Thread.MAX_PRIORITY);	
        System.out.println(t);
}
}
class multithreaded_programing 
{
    public static void main(String args[]) 
    {
        new newthread();        
    }
}
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
37
Which of these method returns a smallest whole number greater than or equal to variable X?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
38
What will be the output of the following Java code?
class Output 
{
     public static void main(String args[]) 
     {
         double x = 3.14;  
         int y = (int) Math.ceil(x);
         System.out.print(y);
     }
}
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
39
Which of this package is used for handling security related issues in a program?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
40
What will be the output of the following Java program?
class Output 
{
    public static void main(String args[]) 
    {
        Long i = new Long(256);  
        System.out.print(i.hashCode());
    }
}
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board