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
20 questions
Prueba de Conocimientos - POO - Java WEB

Quiz
•
University
20 questions
DSA (QUIZ 6) Hashing, Graphs, Advanced Graph Algorithms, and DP

Quiz
•
University
20 questions
RIDDLE_IT_OUT

Quiz
•
University
11 questions
TRẢ LỜI ĐÚNG - TRÚNG QUÀ COOL

Quiz
•
University
20 questions
Java MCQs on Syntax and Semantics

Quiz
•
University
16 questions
Sistematizacija gradiva IX

Quiz
•
9th Grade - University
16 questions
Understanding Assembly Language , Algorithms ,pseudocode

Quiz
•
University
15 questions
Java Concepts Assessment For J.A

Quiz
•
University
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Information Technology (IT)
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
7 questions
Common and Proper Nouns

Interactive video
•
4th Grade - University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University
7 questions
PC: Unit 1 Quiz Review

Quiz
•
11th Grade - University
7 questions
Supporting the Main Idea –Informational

Interactive video
•
4th Grade - University
12 questions
Hurricane or Tornado

Quiz
•
3rd Grade - University
7 questions
Enzymes (Updated)

Interactive video
•
11th Grade - University