Java array
Quiz
•
Computers
•
11th Grade - University
•
Practice Problem
•
Hard
Сергій Денисенко
Used 1+ times
FREE Resource
Enhance your content in a minute
6 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Що виведе наступна програма?
class ArrayTest {
public static void main(String[] args) {
float[] f1, f2;
f1 = new float[10];
f2 = f1;
System.out.println("f2[0] = " + f2[0]);
}
}
Помилка компіляції в рядку f2 = f1;
Виведе у консоль f2[0] = null
Виведе у консоль f2[0] = 0.0
2.
MULTIPLE SELECT QUESTION
2 mins • 1 pt
Виберіть правильні варіанти створення масиву.
int array[] = {5, 7, 3};
int[5] array = new int;
int[] array = new int[4];
int[] array = {5; 7; 3};
3.
MULTIPLE SELECT QUESTION
1 min • 1 pt
Які варіанти спричинять помилку компілятора?
float f2[] = new float[];
float[]f1 = new float[3];
float f3[] = new float[3];
float[] f = new float(3);
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Що спричиняє помилку компілятора?
double array[] = {3, 5, 8};
boolean results[] = new boolean[]{true, false, true};
String cats[] = {"Fluffy", "Spot", "Zeus"};
int [ ][ ] scores = {2,7,6}, {9,3,45};
5.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Існує наступний код:
int[] a = new int[15];
Які твердження вірні?
a[0] рівне null
a[14] не визначено
a[14] дорівнює 0
a.length дорівнює 15
6.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
Яким є результат виконання наступного коду?
public class MyArrays {
public static void main(String[] args) {
byte array[][] = {{1, 2, 3, 4}, {1, 2, 3}};
System.out.println(array[1].length + " " + array.length);
}
}
3 7
2 7
2 4
помилка компіляції
3 2
Similar Resources on Wayground
10 questions
Programacion Orientada a Objetos
Quiz
•
12th Grade - University
10 questions
Seatwork for Data Storage
Quiz
•
University
10 questions
G10 CS Linear Search
Quiz
•
12th Grade
10 questions
Pengenalan Perangkat Komputer dan Instalasi
Quiz
•
9th - 12th Grade
10 questions
Data Types Quiz
Quiz
•
12th Grade
10 questions
Selection Control Structure Quiz
Quiz
•
6th Grade - University
11 questions
DSA Diaries 2.0
Quiz
•
University
10 questions
Algorithm analysis: divide & conquer theory
Quiz
•
University
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
15 questions
4:3 Model Multiplication of Decimals by Whole Numbers
Quiz
•
5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
The Best Christmas Pageant Ever Chapters 1 & 2
Quiz
•
4th Grade
12 questions
Unit 4 Review Day
Quiz
•
3rd Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
Discover more resources for Computers
15 questions
Internet Vocabulary Notebook Check #2 - CTEA(2024)
Quiz
•
12th Grade
11 questions
Internet Terms Vocabulary- Notebook Check #1- CTEA
Quiz
•
12th Grade
50 questions
Money Matters Fall 2025 Final Exam — Worksheet Questions
Quiz
•
12th Grade
47 questions
CSF Final Exam Practice
Quiz
•
9th - 12th Grade
