Java Strings and Math Quiz

Java Strings and Math Quiz

12th Grade

15 Qs

quiz-placeholder

Similar activities

Java Level 1 - A

Java Level 1 - A

12th Grade

15 Qs

Python Programming Quiz

Python Programming Quiz

9th - 12th Grade

14 Qs

APCS A - Array 6.1,6.2,6.3,6.

APCS A - Array 6.1,6.2,6.3,6.

9th - 12th Grade

20 Qs

Java Script Quiz

Java Script Quiz

9th - 12th Grade

15 Qs

Java, part I

Java, part I

11th Grade - University

20 Qs

GCSE Computer Science Data types

GCSE Computer Science Data types

10th - 12th Grade

18 Qs

Python Boolean and If

Python Boolean and If

9th - 12th Grade

10 Qs

Java

Java

12th Grade

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