Java String Objects & Methods

Java String Objects & Methods

Assessment

Flashcard

Computers

12th Grade

Hard

Created by

Quizizz Content

FREE Resource

Student preview

quiz-placeholder

11 questions

Show all answers

1.

FLASHCARD QUESTION

Front

Which of the following is NOT a primitive data type?
double,
float,
boolean,
String

Back

String

2.

FLASHCARD QUESTION

Front

Which of these operators can be used to concatenate two or more String objects? +, ++, +=, +-

Back

+

3.

FLASHCARD QUESTION

Front

Which data type gets returned from length() method in String class?

Back

int

4.

FLASHCARD QUESTION

Front

What is the value of len in the following code?
String s= "jump it";
int len = s.length();

Back

7

5.

FLASHCARD QUESTION

Front

Which method was used to convert this String: "Life is TOO SHORT to be BORED" to: "life is too short to be bored" ?

Back

toLowerCase()

6.

FLASHCARD QUESTION

Front

To which package does the string class belong to? Options: java.io, java.util, java.lang, javax.conn

Back

java.lang

7.

FLASHCARD QUESTION

Front

String s="quarantine";
int x = s.indexOf("a");
What is the value of x?

Back

2

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?