Was passiert bei folgendem Code:
int[] arr = new int[3];
arr[3] = 1;
Prog1 Tut 04
Quiz
•
Computers
•
University
•
Hard
Ricardo Keiling
Used 3+ times
FREE Resource
6 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Was passiert bei folgendem Code:
int[] arr = new int[3];
arr[3] = 1;
An der Index Position 3 wird der Wert 1 eingetragen.
Es gibt eine ArrayIndexOutOfBoundsException
Der Compiler ignoriert die Zeile, weil der Index 3 nicht existiert.
Keine der Antworten
2.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
int[][] arr = new int[2][3];
Wie bestimmt man die Länge der zweiten Zeile des Arrays?
arr[1].length
arr[2].length
arr.length
arr[1][1].length
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Was wird ausgegeben, wenn man das folgende Array Zeile für Zeile ausgibt?
0 1 2
4 5 6
0 1 2
3 4 5
0 1 2
0 1 2
Keine der Antworten
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Was wird ausgegeben?
4
4
3
4
3
4
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Was wird ausgegeben?
44
01234
01234
01234
0123
0123
0123
Nichts (wegen dem 'break' statement)
6.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Welchen Rückgabetyp wählt man für eine Klassenmethode (siehe Bild), wenn die Methode nichts zurückgeben soll?
'void'
man lässt den Rückgabetyp weg
'nothing'
keine der Antworten
8 questions
ROrg Wdh vor Weihnachten
Quiz
•
University
8 questions
Webtech Tut2
Quiz
•
University
10 questions
Quiz 8: Arrays&Vector
Quiz
•
University
10 questions
Vertragsarten und Gestaltung
Quiz
•
12th Grade - University
10 questions
Prob. prog 2
Quiz
•
University
5 questions
Tutorium 4
Quiz
•
University
8 questions
Quiz über E-Mail
Quiz
•
9th Grade - University
8 questions
Arduino_Digitale-Eingänge
Quiz
•
7th Grade - University
15 questions
Character Analysis
Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing
Quiz
•
9th - 12th Grade
10 questions
American Flag
Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension
Quiz
•
5th Grade
30 questions
Linear Inequalities
Quiz
•
9th - 12th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25
Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers
Quiz
•
6th - 8th Grade