
Latihan Java
Quiz
•
Information Technology (IT)
•
12th Grade
•
Practice Problem
•
Hard
NORSHAHIRA FAUZI
Used 1+ times
FREE Resource
Enhance your content in a minute
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
Create a free account and access millions of resources
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
HTML Quiz Lesson 1-4
Quiz
•
12th Grade
10 questions
Մաքուր կոդ
Quiz
•
9th - 12th Grade
9 questions
Binary, Decimal, Hexadecimal Knowledge
Quiz
•
7th Grade - University
11 questions
2.1.6 Fungsi Agregat F5
Quiz
•
12th Grade
9 questions
G12- Python Inputs and Exercises
Quiz
•
12th Grade - University
8 questions
MA3-App Lab Design and Functionality
Quiz
•
9th - 12th Grade
6 questions
G9-Introduction to Python Selection
Quiz
•
9th Grade - University
12 questions
Information Assurance and Security Quiz
Quiz
•
12th Grade
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th 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
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade
Discover more resources for Information Technology (IT)
26 questions
Christmas Movie Trivia
Lesson
•
8th Grade - Professio...
15 questions
Christmas Song Emoji Pictionary
Quiz
•
7th - 12th Grade
20 questions
Christmas Movies
Quiz
•
1st - 12th Grade
55 questions
CHS Holiday Trivia
Quiz
•
12th Grade
20 questions
Christmas Movie Trivia
Quiz
•
9th - 12th Grade
29 questions
christmas facts
Lesson
•
5th - 12th Grade
20 questions
Christmas Trivia
Quiz
•
5th - 12th Grade
20 questions
Stages of Meiosis
Quiz
•
9th - 12th Grade
