Java Strings and Math Quiz

Java Strings and Math Quiz

12th Grade

15 Qs

quiz-placeholder

Similar activities

Parts of a Method (Java)

Parts of a Method (Java)

9th Grade - University

16 Qs

Java Method

Java Method

12th Grade

19 Qs

Do Now Lesson 2

Do Now Lesson 2

9th - 12th Grade

15 Qs

Python basics recap

Python basics recap

9th - 12th Grade

20 Qs

Java Script

Java Script

10th - 12th Grade

10 Qs

Java Level 1 - D

Java Level 1 - D

12th Grade

15 Qs

CS2 Review

CS2 Review

9th - 12th Grade

12 Qs

TLE QUIZZIZ 2

TLE QUIZZIZ 2

9th - 12th Grade

10 Qs

Java Strings and Math Quiz

Java Strings and Math Quiz

Assessment

Quiz

Computers

12th Grade

Medium

Created by

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

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?