pencil-icon
Build your own quiz

Computers

10th -

12thgrade

Image

Java Arrays Basic

user

1.5K
plays

15 questions

Show Answers
See Preview
  • 1. Multiple Choice
    30 seconds
    1 pt

    Which of the following is FALSE about arrays on Java

    A java array is always an object

    Length of array can be changed after creation of array

    Arrays in Java are always allocated on heap

  • 2. Multiple Choice
    20 seconds
    1 pt

    Find the output

    class Test {

    public static void main(String args[]) {

    int arr[2];

    System.out.println(arr[0]);

    System.out.println(arr[1]);

    }

    }

    Compile error

    Exception

    Garbage Value

    Garbage Value

    0

    0

  • 3. Multiple Choice
    30 seconds
    1 pt

    Find the output

    class Test {

    public static void main(String args[]) {

    int arr [ ] = new int[2];

    System.out.println(arr[0]);

    System.out.println(arr[1]);

    }

    }

    Compile error

    Exception

    Garbage Value

    Garbage Value

    0

    0

  • Answer choices
    Tags
    Answer choices
    Tags

    Explore all questions with a free account

    Already have an account?