Home » JAVA Programming » Basic Datatypes » Question
  1. What is the output of this program?

    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] = 'j';
    System.out.print(array_variable[i] + "" );
    i++;
    }
    }
    }
    1. i i i i i
    2. 0 1 2 3 4
    3. i j k l m
    4. j j j j j
    5. None of the mentioned
Correct Option: D

output: j j j j j



Your comments will be displayed only after manual approval.