Which of the following is a valid variable name in Java?

Arnaiz Mod. Prelim Exam Java and MySQL

Quiz
•
Computers
•
University
•
Medium
Alvin Garci
Used 1+ times
FREE Resource
55 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
2value
value_2
value-2
@value
2.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
What is the default value of an int variable in Java?
0
null
undefined
-1
3.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
Which keyword is used to declare a constant variable in Java?
const
static
final
constant
4.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
What is the size of a float variable in Java?
4 bytes
2 bytes
8 bytes
1 byte
5.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
Which of the following is not a primitive data type in Java?
int
boolean
String
char
6.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
How do you declare a double variable named price?
double = price;
price double;
double price;
price = double;
7.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
Which operator is used for assignment in Java?
==
:=
=
=>
Create a free account and access millions of resources
Similar Resources on Quizizz
50 questions
Big Data Analytics Quiz

Quiz
•
University
52 questions
DBMS Midterms

Quiz
•
University
50 questions
Web Designing-2025

Quiz
•
University
60 questions
FDS_MIDTERM

Quiz
•
University
50 questions
DBMS-CCE 1_B.Sc-4_13-02-25

Quiz
•
University
50 questions
Power BI Quiz

Quiz
•
University
50 questions
PNETSEC Final Examination (II-BINS)

Quiz
•
University
50 questions
basis data

Quiz
•
University
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade