
Java Fundamentals Assessment

Quiz
•
Computers
•
12th Grade
•
Medium
Govindharaj I
Used 3+ times
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What are the four main data types in Java?
float, double, char, boolean
string, object, array, map
decimal, integer, character, pointer
byte, short, int, long
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the difference between int and Integer in Java?
int can hold null values; Integer cannot.
Integer is faster than int in performance.
int is a primitive type; Integer is a wrapper class.
int is a reference type; Integer is a primitive type.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you declare a constant in Java?
Declare a constant using 'static' keyword.
Use 'final' keyword to declare a constant, e.g., 'final int MY_CONSTANT = 10;'
Use 'const' keyword to declare a constant.
Constants can be declared without any keyword.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the if-else statement in Java?
To handle exceptions in the code.
To control the flow of execution based on conditions.
To create loops in the program.
To define variables in Java.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Explain the switch statement and its use cases.
The switch statement is used for executing different code blocks based on the value of a variable or expression, providing a cleaner alternative to multiple if-else statements.
The switch statement is a type of loop that repeats code until a condition is met.
The switch statement can only handle boolean values.
The switch statement is only used for numerical comparisons.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a loop in Java? Name the types of loops available.
foreach loop
repeat-until loop
for loop, while loop, do-while loop
switch loop
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the difference between a while loop and a do-while loop?
A while loop is used for infinite loops, while a do-while loop is for conditional loops.
The main difference is that a while loop may not execute at all if the condition is false, while a do-while loop always executes at least once.
Both loops execute the same number of times regardless of the condition.
A while loop executes at least once, while a do-while loop may not execute at all.
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
Vocab Day 9-12 Study Guide

Quiz
•
12th Grade
10 questions
Unit Terms 2.3 -2.10

Quiz
•
12th Grade
20 questions
JavaScript Basics Test

Quiz
•
10th - 12th Grade
16 questions
Codecademy Intro to JavaScript

Quiz
•
9th - 12th Grade
15 questions
Java Level 1 - C

Quiz
•
12th Grade
10 questions
Unit 23 - Pop Quiz

Quiz
•
12th Grade
20 questions
1TEC_AVALIAÇÃO LÓGICA COMPUTACIONAL 3º TRI_AV5

Quiz
•
12th Grade - University
15 questions
JAVA: Level-1

Quiz
•
5th - 12th Grade
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 Computers
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade
35 questions
Computer Baseline Examination 2025-26

Quiz
•
9th - 12th Grade
13 questions
Problem Solving Process

Quiz
•
9th - 12th Grade
10 questions
Understanding Algorithms with Pseudocode and Flowcharts

Interactive video
•
9th - 12th Grade
19 questions
AP CSP Unit 1 Review (code.org)

Quiz
•
10th - 12th Grade