
Latihan Java
Authored by NORSHAHIRA FAUZI
Information Technology (IT)
12th Grade
Used 1+ 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
30 sec • 1 pt
Apakah kegunaan import java.util.Scanner;?
Untuk membaca input daripada pengguna
Untuk membuat looping
Untuk mengira nombor secara automatik
Untuk memaparkan teks ke skrin
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Manakah sintaks if yang betul untuk memeriksa jika num lebih besar daripada 10?
if num > 10
{ System.out.println ("Besar");
}
if (num > 10)
{ System.out.println ("Besar");
}
if num > 10;
{System.out.println ("Besar");
if (num > 10)
System.out.prinln ("Besar")
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Manakah sintaks yang betul untuk mendapatkan nilai purata dari tiga nombor bulat dalam bentuk perpuluhan?
int a = 5, b = 8, c = 10;
double avg = (a + b + c) / 3;
System.out.println (avg);
int a = 5, b = 8, c = 8;
double avg = double (a + b + c) / 3;
System.out.println(avg);
int a = 5, b = 8, c = 10;
double avg = (a + b + c) / 3.0;
System.out.println (avg);
int a = 5, b = 8, c = 10;
double avg = (a + b + c) / three;
System.out.println (avg);
4.
FILL IN THE BLANK QUESTION
1 min • 1 pt
Susun kod di bawah supaya program boleh memaparkan hasil tambah dua nombor dengan betul.
A. System.out.println(sum);
B. int a = 5, b = 7;
C. int sum = a + b;
D. public static void main(String[] args) {
E. }
5.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Pilih pasangan yang tepat
int variable = input.next();
float variable = input.nextInt();
double variable = input.nextDouble();
boolean variable = input.next.next();
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Apakah output kod ini?
for (int i = 1; i <= 5; i++) {
System.out.print(i * i + " ");
}
1 2 3 4 5
1 8 27 64 125
2 4 6 8 10
1 4 9 16 25
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Apakah output kod ini?
int count = 0;
for (int i = 1; i <= 4; i++) {
count += i;
}
System.out.println(count);
4
6
10
15
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
14 questions
Data Structures Quiz
Quiz
•
9th - 12th Grade
10 questions
Khám Phá Nghề Nghiệp Trong Tin Học
Quiz
•
8th Grade - University
10 questions
Ultrasonic Sensor - L1
Quiz
•
6th Grade - University
10 questions
java2/67
Quiz
•
12th Grade - University
11 questions
C++ Moxillón
Quiz
•
9th - 12th Grade
10 questions
Network secutiry
Quiz
•
9th Grade - University
15 questions
Quiz Pemrograman Python
Quiz
•
10th Grade - University
15 questions
Pengenalan Aplikasi AppSheet
Quiz
•
11th Grade - University
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 Information Technology (IT)
20 questions
-AR -ER -IR present tense
Quiz
•
10th - 12th Grade
12 questions
Add and Subtract Polynomials
Quiz
•
9th - 12th Grade
13 questions
Model Exponential Growth and Decay Scenarios
Quiz
•
9th - 12th Grade
27 questions
7.2.3 Quadrilateral Properties
Quiz
•
9th - 12th Grade
7 questions
Amoeba Sisters Dihybrid Cross Punnett Square
Interactive video
•
9th - 12th Grade
10 questions
The Holocaust: Historical Overview
Interactive video
•
9th - 12th Grade
10 questions
Key Features of Quadratic Functions
Interactive video
•
8th - 12th Grade
11 questions
Exponent Quotient Rules A1 U7
Quiz
•
9th - 12th Grade