Java String and Character Classes Revision

Java String and Character Classes Revision

Assessment

Flashcard

Computers

11th Grade

Hard

Created by

Ann Albertyn

FREE Resource

Student preview

quiz-placeholder

9 questions

Show all answers

1.

FLASHCARD QUESTION

Front

To convert a char from lower to upper case, use

Back

toUpperCase()

2.

FLASHCARD QUESTION

Front

The toUpperCase() method of the Character class is

Back

static

3.

FLASHCARD QUESTION

Front

A typed method is one that _____ a value.

Back

returns

4.

FLASHCARD QUESTION

Front

non-static methods are called using the form: objectName.methodName()

Back

true

5.

FLASHCARD QUESTION

Front

Void methods ____ return a value

Back

do not

6.

FLASHCARD QUESTION

Front

To find out how long the String below is use: String city = "Johannesburg"

Back

city.length()

7.

FLASHCARD QUESTION

Front

The charAt() method extracts ____ character(s) from a String

Back

one

8.

FLASHCARD QUESTION

Front

"Johannesburg".substring(2,5) will return:

Back

han

9.

FLASHCARD QUESTION

Front

To find out if a word contains an "x" or not, use: word.indexOf("x"), word.index("x"), word.has("x")

Back

word.indexOf("x")