ExamVeda
Login
Home
Data Types and Variables
?

What will be the output of the following Java program, if we run as "java main_arguments 1 2 3"?
class main_arguments 
{
    public static void main(String [] args) 
    {
        String [][] argument = new String[2][2];
        int x;
        argument[0] = args;
        x = argument[0].length;
        for (int y = 0; y < x; y++) 
            System.out.print(" " + argument[0][y]);              
    }
}

Answer & Solution
Correct Answer: Option D
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.