ExamVeda
Login
Home
Constructors and Methods
?

What will be the output of the following Java program?
class main_class 
{
    public static void main(String args[])
    {
        int x = 9;
        if (x == 9) 
        { 
            int x = 8;
            System.out.println(x);
        }
    } 
}

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.