ExamVeda
Login
Home
Constructors and Methods
?

What will be the output of the following Java code?
class area 
{
    int width;
    int length;
    int area;
    void area(int width, int length) 
    {
        this.width = width;
        this.length = length;
    }

}    
class Output 
{
    public static void main(String args[])
    {
        area obj = new area();
        obj.area(5 , 6);
        System.out.println(obj.length + " " + obj.width);        
    } 
}

Answer & Solution
Correct Answer: Option C
Let's discuss the solution. Join the discussion
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.