
Java chương 1
Authored by Phamthihuong Dtth
Mathematics
1st - 5th Grade
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
Câu lệnh xác định độ dài mảng buses là:
int buses[] = new int[5];
buses.length
buses.length()
buses.size
buses.size()
2.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
Cho biết kết quả:
String[] nums = new String[] { "1", "9", "10" };
Arrays.sort(nums);
System.out.println(Arrays.toString(nums));
[1, 9, 10]
[1, 10, 9]
[10, 1, 9]
3.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
Cho biết kết quả:
String[] os = new String[] { "Mac", "Linux", "Windows" };
Arrays.sort(os);
System.out.println(Arrays.binarySearch(os, "Mac"));
0
1
2
4.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
Cho biết kết quả:
public class Test{
public static void main(String[] args){
int[] a = new int[0];
System.out.print(a.length);
}
}
Sai a.length
lỗi vì size mảng không thể = 0
0
5.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
Cho biết kết quả:
public class Test{
public static void main(String[] args){
int[] x = new int[3];
System.out.println("x[0] is " + x[0]);
}
}
Lỗi vì mảng chưa khởi tạo
x[0] is 0
Lỗi không có giá trị x[0]
6.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
Cho kết quả: public class Test{
public static void main(String args[]){
double[] myList = {1, 5, 5, 5, 5, 1};
double max = myList[0];
int indexOfMax = 0;
for(int i = 1; i < myList.length; i++){
if(myList[i] > max){
max = myList[i];
indexOfMax = i;
}
}
System.out.println(indexOfMax);
}
}
0
2
1
7.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
Cho biết kết quả:
String s1 = "Java";
String s2 = "Java";
StringBuilder sb1 = new StringBuilder();
sb1.append("Ja").append("va");
System.out.println(s1 == s2);
System.out.println(s1.equals(s2));
System.out.println(sb1.toString() == s1);
System.out.println(sb1.toString().equals(s1));
in ra 1 lần true
in ra 2 lần true
in ra 3 lần true
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
13 questions
Unit 11 Perimeter Review
Quiz
•
2nd - 5th Grade
11 questions
IM unit 2 End of Unit assessment
Quiz
•
5th Grade
14 questions
Read & Write Decimals
Quiz
•
5th Grade
11 questions
Toán học lớp 5
Quiz
•
5th Grade
8 questions
Heavy, Light
Quiz
•
2nd Grade
10 questions
Ratio and proportion
Quiz
•
4th - 6th Grade
11 questions
Unit 8 Review (taken from Reveal)
Quiz
•
3rd Grade
10 questions
POINTS, LINES AND PLANES
Quiz
•
1st - 12th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
Discover more resources for Mathematics
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
10 questions
Area
Quiz
•
3rd Grade
20 questions
Identifying Fractions
Quiz
•
3rd Grade
10 questions
Multiplying Fractions
Quiz
•
5th Grade