Java Strings and Math Quiz

Quiz
•
Computers
•
12th Grade
•
Medium
Wit Paña
Used 17+ times
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a String variable in Java?
A collection of integers
A collection of characters surrounded by single quotes
A collection of characters surrounded by double quotes
A collection of boolean values
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which method is used to find the length of a String in Java?
count()
getLength()
size()
length()
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the indexOf() method return?
The entire string
The length of the string
The index of the first occurrence of specified text
The last occurrence of a character
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What operator is used for String concatenation in Java?
&
+
*
%
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the result of adding two Strings in Java?
A number
An error
A boolean
A String concatenation
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What escape character is used to insert a double quote in a String?
!
/
"
\
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the Math.max(X, Y) method do?
Returns the sum of X and Y
Returns the average of X and Y
Returns the highest value of X and Y
Returns the minimum value of X and Y
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
JavaScript Basics Test

Quiz
•
10th - 12th Grade
20 questions
ict5_mt_w2_sw2

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

Quiz
•
5th - 12th Grade
10 questions
Quiz 9 (15.09.2021)

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

Quiz
•
12th Grade
15 questions
1er Quiz Fundamentos de Programación - SystemPlus

Quiz
•
9th - 12th Grade
20 questions
JAVA FUNDAMENTALS

Quiz
•
9th - 12th Grade
18 questions
AP CSA U1L01-03

Quiz
•
11th - 12th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade