Array
Save
Edit
Host a game
Live GameLive
Homework
Solo Practice
Practice
11 QuestionsShow answers
  • Question 1
    60 seconds
    Report an issue
    Q.

    Java code to create a non-element array of student marks with the size of 20.

    answer choices

    double mark;

    double [20] mark = new double;

    double [ ] mark = new mark [20];

    double [ ] mark = new double [20];

  • Question 2
    60 seconds
    Report an issue
    Q.

    Java code to create a non-element array of student name with size 15.

    answer choices

    String [ ] name = new String;

    String [ ] name = new String [15];

    name = new String [15];

    String [15] name = new String [ ];

  • Question 3
    60 seconds
    Report an issue
    Q.

    Java code to create an array of student id with element 115331, 450055, 555641, 875560 and 987555.

    answer choices

    int [ ] id = new {115331, 450055, 555641, 875560, 987555};

    int [5] id = {115331, 450055, 555641, 875560, 987555};

    int [ ] id = {115331, 450055, 555641, 875560, 987555};

    int [ ] id = new int [5];

  • Question 4
    60 seconds
    Report an issue
    Q.

    Java code to create an array of subject code with element S, M, C, P, I and K.

    answer choices

    char [ ] code = {'S', 'M', 'C', 'P', 'I' and 'K'};

    char [ ] code = {S, M, C, P, I, K};

    char [ ] code = {"S", "M", "C", "P", "I", "K"};

    char [ ] code = {'S', 'M', 'C', 'P', 'I', 'K'};

  • Question 5
    60 seconds
    Report an issue
    Q.

    Java code to display the size of an array name studentname[ ].

    answer choices

    System.out.println("The size is " + studentname[ index ]);

    System.out.println("The size is " + studentname.length);

    System.out.println("The size is " + length.length);

    System.out.println("The size is " + studentname);

  • Question 6
    60 seconds
    Report an issue
    Q.

    Java code to display all elements of array studentname[ ].

    answer choices
  • Question 7
    60 seconds
    Report an issue
    Q.

    Java code to read elements into array studentname[ ].

    answer choices
  • Question 8
    60 seconds
    Report an issue
    Q.

    Java code to read elements into array customerid[ ].

    answer choices

    None of the above is the right answer.

  • Question 9
    60 seconds
    Report an issue
    Q.

    A code segment to identify the largest element in an array.

    answer choices
  • Question 10
    60 seconds
    Report an issue
    Q.

    Based on the code segment below:- identify the name of the array.


    for(int j=0; j<balance.length; j++)

    {

    System.out.print("Enter amount: ");

    .......

    }

    answer choices

    No answer.

    temp[ ]

    balance

    balance [ i ]

  • Question 11
    60 seconds
    Report an issue
    Q.

    Based on the code segment below:- identify the name of the array.


    for(int j=0; j<balance.length; j++)

    {

    System.out.print("Enter amount: ");

    .......

    }

    answer choices

    No answer.

    temp[ ]

    balance

    balance [ i ]

Report an issue
Why show ads?
Report Ad
Join a game