Strings

Strings

11th Grade

10 Qs

quiz-placeholder

Similar activities

2.2 Understanding String Manipulation(C&D)

2.2 Understanding String Manipulation(C&D)

11th Grade

15 Qs

Unit 7 quiz on strings AP CSP

Unit 7 quiz on strings AP CSP

9th - 12th Grade

14 Qs

CodeHS

CodeHS

10th - 12th Grade

12 Qs

CodeHS APCSP Python

CodeHS APCSP Python

10th - 12th Grade

12 Qs

String methods

String methods

11th Grade

15 Qs

Pop Quiz

Pop Quiz

11th Grade

10 Qs

Java String and Character Classes Revision

Java String and Character Classes Revision

11th Grade

10 Qs

Python Fundamentals

Python Fundamentals

11th - 12th Grade

12 Qs

Strings

Strings

Assessment

Quiz

Computers

11th Grade

Easy

Created by

Francesca [Student]

Used 3+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

append is a method in the StringBuffer class

True

False

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

append is a method in the String class

true

false

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

You cannot call a literal string's methods, as in "Hello".equals(str).

True

False

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Given

String word1 = "at";

String word2 = "Cat";

what is returned by word2.compareTo(word1)?

A negative integer

false

true

A positive integer

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The Character class contains the static method boolean isUpperCase(char ch).

True

False

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What happens if str.length() is 8 and you call str.charAt(8)?

charAt returns the random character that happens to be stored after the string.

You get a StringIndexOutOfBoundsException.

charAt returns the last character of str.

charAt returns -1.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The length method returns 0 for an empty string.

True

False

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?