String Method

String Method

10th Grade

10 Qs

quiz-placeholder

Similar activities

Tin 8/1

Tin 8/1

KG - University

10 Qs

Repaso Estructura de datos U1

Repaso Estructura de datos U1

1st Grade - University

10 Qs

QBASIC Programming

QBASIC Programming

5th - 10th Grade

10 Qs

Computer Security:Encryption

Computer Security:Encryption

10th Grade - University

10 Qs

Quis Grade 5

Quis Grade 5

9th - 12th Grade

15 Qs

TIN 10 BÀI F4

TIN 10 BÀI F4

10th Grade

10 Qs

Pengantar C/C++/Java

Pengantar C/C++/Java

1st - 12th Grade

9 Qs

Web программирование, повторение

Web программирование, повторение

10th Grade

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