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
10 questions
PBO XII RPL

Quiz
•
9th - 12th Grade
16 questions
XIБ_Script

Quiz
•
9th - 12th Grade
10 questions
Python Boolean and If

Quiz
•
9th - 12th Grade
18 questions
GCSE Computer Science Data types

Quiz
•
10th - 12th Grade
20 questions
3rd Qtr QUIZ1 COMPUTER PROGRAMMING-Strings in Java-2-22-2023

Quiz
•
12th Grade
18 questions
Scanner & If Statements

Quiz
•
5th - 12th Grade
10 questions
Java Strings

Quiz
•
1st Grade - Professio...
15 questions
Java Level 1 - A

Quiz
•
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