Java Basics Quiz for CH/PT Students

Quiz
•
Information Technology (IT)
•
University
•
Medium
Geshani ITUM
Used 23+ times
FREE Resource
16 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 sec • 5 pts
What does System.out.println() do?
Takes user input
Outputs text to the console
Ends a program
None of the above
2.
MULTIPLE CHOICE QUESTION
20 sec • 5 pts
Which keyword is used to define a class in Java?
class
define
struct
object
3.
MULTIPLE CHOICE QUESTION
20 sec • 5 pts
What is the purpose of the public keyword in Java?
It hides the method or class from other classes.
It allows the method or class to be accessed from outside.
It specifies that the method is private.
None of the above.
4.
MULTIPLE CHOICE QUESTION
20 sec • 5 pts
Which of the following is a correct way to declare a variable in Java?
int 1x = 10;
int x = 10;
integer x = 10;
num x = 10;
5.
MULTIPLE CHOICE QUESTION
20 sec • 5 pts
Which data type is used to store a single character in Java?
char
String
int
boolean
6.
MULTIPLE CHOICE QUESTION
20 sec • 5 pts
What will be the value of the variable z after executing the code below? int x = 5, y = 10; int z = x + y;
5
10
15
50
7.
MULTIPLE CHOICE QUESTION
20 sec • 5 pts
What will be the result of the following code? int a = 10, b = 3; System.out.println(a % b);
1
3
10
0
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
Java_MCQ_3

Quiz
•
University
15 questions
Quiz Pemrograman Python

Quiz
•
10th Grade - University
20 questions
quiz1B1

Quiz
•
7th Grade - University
17 questions
MCQs on Iterative Statements in Java

Quiz
•
University
12 questions
Aula07 - Matrizes

Quiz
•
University
20 questions
2F-3 | Python Quiz | 14/11/2024

Quiz
•
University
14 questions
Quiz-Java

Quiz
•
University
21 questions
Лекция 3. Текстовые строки. Ввод/вывод данных.

Quiz
•
University
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade