String Method

String Method

10th Grade

10 Qs

quiz-placeholder

Similar activities

Java Quiz 2: Classes and Objects

Java Quiz 2: Classes and Objects

6th - 12th Grade

10 Qs

Строки. Преобразование типов данных

Строки. Преобразование типов данных

10th Grade

10 Qs

Delphi Revision Part 2

Delphi Revision Part 2

8th - 10th Grade

7 Qs

JAVA Quiz (week 1)

JAVA Quiz (week 1)

10th Grade

10 Qs

java variables 1

java variables 1

9th - 12th Grade

13 Qs

Программирование C#

Программирование C#

1st - 10th Grade

10 Qs

Variables & Control Flow [0]

Variables & Control Flow [0]

9th - 11th Grade

10 Qs

Delphi Arguments/Returns

Delphi Arguments/Returns

8th - 10th Grade

10 Qs

String Method

String Method

Assessment

Quiz

Computers

10th Grade

Hard

Created by

Namrata Dekate

Used 79+ times

FREE Resource

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.

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?