
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
15 questions
ทศนิยมหาร
Quiz
•
5th Grade
12 questions
Multiply or Divide
Quiz
•
5th - 6th Grade
15 questions
Financial Literacy
Quiz
•
2nd - 3rd Grade
10 questions
Are You Smarter Than a 5th Grader: Math Edition
Quiz
•
5th Grade
10 questions
5th Grade Math Cluster 6 Review
Quiz
•
5th Grade
10 questions
Fraction-Of Problems
Quiz
•
5th Grade
10 questions
Integration of Trigonometric Function
Quiz
•
3rd Grade
15 questions
My Math - Chapter 12 - 1A
Quiz
•
4th Grade
Popular Resources on Wayground
8 questions
2 Step Word Problems
Quiz
•
KG - University
20 questions
Comparing Fractions
Quiz
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Latin Bases claus(clois,clos, clud, clus) and ped
Quiz
•
6th - 8th Grade
22 questions
fractions
Quiz
•
3rd Grade
7 questions
The Story of Books
Quiz
•
6th - 8th Grade
Discover more resources for Mathematics
8 questions
2 Step Word Problems
Quiz
•
KG - University
20 questions
Comparing Fractions
Quiz
•
4th Grade
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
Adding and Subtracting Fractions with Like Denominators
Quiz
•
4th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade