Examveda
Examveda

What will be the output of the following Java code?
class array_output 
{
    public static void main(String args[]) 
    {
        char array_variable [] = new char[10];
  for (int i = 0; i < 10; ++i) 
        {
            array_variable[i] = 'i';
            System.out.print(array_variable[i] + "");
        }
    } 
}

A. 1 2 3 4 5 6 7 8 9 10

B. 0 1 2 3 4 5 6 7 8 9 10

C. i j k l m n o p q r

D. i i i i i i i i i i

Answer: Option D


This Question Belongs to Java Program >> Array

Join The Discussion

Related Questions on Array