Array

Assessment
•
rasyida rahman
•
Computers
•
University
•
2K plays
•
Hard
Student preview

11 questions
Show answers
1.
Multiple Choice
Java code to create a non-element array of student marks with the size of 20.
double mark;
double [20] mark = new double;
double [ ] mark = new mark [20];
double [ ] mark = new double [20];
2.
Multiple Choice
Java code to create a non-element array of student name with size 15.
String [ ] name = new String;
String [ ] name = new String [15];
name = new String [15];
String [15] name = new String [ ];
3.
Multiple Choice
Java code to create an array of student id with element 115331, 450055, 555641, 875560 and 987555.
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];
4.
Multiple Choice
Java code to create an array of subject code with element S, M, C, P, I and K.
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'};
5.
Multiple Choice
Java code to display the size of an array name studentname[ ].
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);
Explore all questions with a free account
Find a similar activity
Create activity tailored to your needs using
Array

•
University
Java Array

•
University
Test2

•
University
Wipro PBL test no 6

•
University
JAVA Array (1)

•
University
Guru Muda 6.0 (Array & Method)

•
University
Java : Array

•
University
Array

•
University