
Java Fundamentals MCQs

Quiz
•
Computers
•
Professional Development
•
Hard
Ms STAFF
Used 1+ times
FREE Resource
25 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the default value of a local variable in Java?
0
null
Depends on data type
Compilation error
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of these is a valid identifier in Java?
2value
_value
@value
value#
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code? int x = 5; int y = 10; System.out.println(x + y + "Hello");
15Hello
Hello15
5Hello10
Compilation error
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which keyword is used to define a constant in Java?
static
final
const
constant
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of these is not a primitive data type in Java?
int
boolean
String
double
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the result of the following code? int x = 10; System.out.println(x > 10 ? "Greater" : "Not Greater");
Greater
Not Greater
true
false
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of this code? char c = 65; System.out.println(c);
A
65
Error
a
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
Introduction to Cybersecurity

Quiz
•
Professional Development
30 questions
Software Development Exam Vocabulary Part 4 - Topics 1-20

Quiz
•
Professional Development
20 questions
Chapter 6 Quiz

Quiz
•
Professional Development
30 questions
Java Quiz

Quiz
•
University - Professi...
25 questions
C Language Test 3

Quiz
•
Professional Development
20 questions
Asdm-midquiz

Quiz
•
Professional Development
20 questions
Cloud Computing_3

Quiz
•
Professional Development
25 questions
Computer Internal Components Study Guide

Quiz
•
KG - Professional Dev...
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

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

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade