ExamVeda
Login
Home
11
Which of the following statements are incorrect?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
12
What is it called if an object has its own lifecycle and there is no owner?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
13
What is true about protected constructor?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
14
What will be the output of the following Java program?
class box 
{
     int width;
     int height;
     int length;
} 
 class mainclass 
 {
     public static void main(String args[]) 
     {        
         box obj = new box();
         System.out.println(obj);
     } 
 }
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
15
In the following Java code, which call to sum() method is appropriate?
class Output 
{
 
        public static int sum(int ...x)
        {
             return; 
        }
        static void main(String args[]) 
        {    
             sum(10);
             sum(10,20);
             sum(10,20,30);
             sum(10,20,30,40);
        } 
}
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
16
How can we identify whether a compilation unit is class or interface from a .class file?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
17
What will be the output of the following Java program?
class box 
{
    int width;
    int height;
    int length;
    int volume;
    void volume(int height, int length, int width) 
    {
         volume = width*height*length;
    } 
}    
class Prameterized_method
{
    public static void main(String args[])
    {
        box obj = new box();
        obj.height = 1;
        obj.length = 5;
        obj.width = 5;
        obj.volume(3,2,1);
        System.out.println(obj.volume);        
    } 
 }
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
18
Which of these will happen if recursive method does not have a base case?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
19
What would be behaviour if the constructor has a return type?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
20
Which keyword is used by the method to refer to the object that invoked it?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board