String Method

String Method

10th Grade

10 Qs

quiz-placeholder

Similar activities

Quiz 3-  Life Cycle of Program

Quiz 3- Life Cycle of Program

10th Grade

10 Qs

ALGORITMA

ALGORITMA

10th Grade

10 Qs

básico de Code

básico de Code

10th - 12th Grade

14 Qs

Internet

Internet

7th - 10th Grade

10 Qs

python-BTxâu

python-BTxâu

9th - 12th Grade

10 Qs

1.1.1 - 1.1.5 Review

1.1.1 - 1.1.5 Review

9th - 10th Grade

14 Qs

Computing figures

Computing figures

4th - 12th Grade

14 Qs

Xcode and Playgrounds

Xcode and Playgrounds

9th - 11th Grade

9 Qs

String Method

String Method

Assessment

Quiz

Computers

10th Grade

Hard

Created by

Namrata Dekate

Used 79+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

The "length" of a string is just the number of chars in it.

TRUE

FALSE

2.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

"Practice".compareTo("Perfect")

0

-1

10

13

3.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which of these operators can be used to concatenate two or more String objects?

+

&

+=

None

4.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which of these method of class String is used to extract a single character from a String object?

CHARAT()

charat()

charAt()

CharAt()

5.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which of these data type value is returned by equals() method of String class?

char

int

boolean

All of the mentioned

6.

MULTIPLE SELECT QUESTION

20 sec • 1 pt

Which of these method of class String is used to remove leading and trailing whitespaces?

startsWith()

trim()

Trim()

doTrim()

7.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which of the following statement is correct?

replace() method replaces all occurrences of one character in invoking string with another character.

replace() method replaces only first occurrence of a character in invoking string with another character.

replace() method replaces all the characters in invoking string with another character.

replace() method replaces last occurrence of a character in invoking string with another character.

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?

Discover more resources for Computers