Java Strings and Math Quiz

Java Strings and Math Quiz

12th Grade

15 Qs

quiz-placeholder

Similar activities

12IP

12IP

12th Grade

20 Qs

Programación Visual

Programación Visual

12th Grade

10 Qs

Java Chapter 1 CS2

Java Chapter 1 CS2

9th - 12th Grade

16 Qs

Apps Unit - Quiz 2

Apps Unit - Quiz 2

6th - 12th Grade

12 Qs

CET 2 Other OS

CET 2 Other OS

10th - 12th Grade

12 Qs

AP CSP Unit 5 Review: Lists, Loops and Traversals

AP CSP Unit 5 Review: Lists, Loops and Traversals

9th - 12th Grade

19 Qs

Java Review 2

Java Review 2

9th - 12th Grade

20 Qs

Topic 4.1 Introduction to Java

Topic 4.1 Introduction to Java

12th Grade

20 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?