ExamVeda
Login
Home
81
What will be the output of the following Java program?
class box 
{
    int width;
    int height;
    int length;
    int volume;
    void volume() 
    {
         volume = width*height*length;
    } 
}    
class Output 
{ 
    public static void main(String args[])
    {
        box obj = new box();
        obj.height = 1;
        obj.length = 5;
        obj.width = 5;
        obj.volume();
        System.out.println(obj.volume);        
    } 
}
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
82
Which of the following is a method having same name as that of it's class?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
83
What is the stored in the object obj in following lines of Java code?
box obj;
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
84
Which concept of Java is a way of converting real world objects in terms of class?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
85
Which component is responsible to optimize bytecode to machine code?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
86
What will be the output of the following Java code?
class box 
{
    int width;
    int height;
    int length;
    int volume;
    box() 
    {
        width = 5;
        height = 5;
        length = 6;
    }
    void volume() 
    {
         volume = width*height*length;
    } 
}    
class constructor_output 
{
    public static void main(String args[])
    {
        box obj = new box();
        obj.volume();
        System.out.println(obj.volume);
    }
}
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
87
Which of the following is a valid declaration of an object of class Box?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
88
What is it called where child object gets killed if parent object is killed?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
89
Which of these keywords is used to make a class?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
90
Which component is responsible for converting bytecode into machine specific code?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board