Strings

Strings

11th Grade

10 Qs

quiz-placeholder

Similar activities

11-27 Data Types in Java

11-27 Data Types in Java

8th Grade - University

8 Qs

CodeHS 3.5 String Methods

CodeHS 3.5 String Methods

9th - 12th Grade

12 Qs

Progamming - Java Syntax

Progamming - Java Syntax

11th - 12th Grade

15 Qs

String Methods

String Methods

9th - 12th Grade

10 Qs

Jenis Data

Jenis Data

7th - 12th Grade

10 Qs

Objekti in razredi JavaScripta

Objekti in razredi JavaScripta

10th - 12th Grade

12 Qs

Java Review Classes

Java Review Classes

11th Grade

10 Qs

Șiruri de caractere - funcții

Șiruri de caractere - funcții

10th Grade - University

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