JAVA string

JAVA string

12th Grade

18 Qs

quiz-placeholder

Similar activities

Tin 8: Giữa kỳ 1

Tin 8: Giữa kỳ 1

1st - 12th Grade

20 Qs

The Limits of Computing

The Limits of Computing

12th Grade

20 Qs

KTTX TIN 8

KTTX TIN 8

KG - University

20 Qs

Topic 4.1 Introduction to Java

Topic 4.1 Introduction to Java

12th Grade

20 Qs

Animated Canvas

Animated Canvas

9th - 12th Grade

19 Qs

Python List, and String

Python List, and String

10th Grade - University

20 Qs

N+ Chapter 5

N+ Chapter 5

12th Grade

20 Qs

CS Terms and Vocab Practice Quiz 3

CS Terms and Vocab Practice Quiz 3

7th - 12th Grade

20 Qs

JAVA string

JAVA string

Assessment

Quiz

Computers

12th Grade

Practice Problem

Hard

Created by

Wayground Content

Used 26+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

18 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

double

String

int

number

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

String txt = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";


What is the correct way to find the length of "txt" string?

int len = length(txt);

float len = txt.length();

int len = txt.length();

double len = length(txt);

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which is correct method to convert String into uppercase

changeUpperCase()

convertUpperCase()

toUpper()

toUpperCase()

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

String word = "A few good men";
What is word.charAt(7) ?

o
g
7
good men

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

String word = "A few good men";
What is word.length()?

14
15
13

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method to use to find length of a string?

length()

size()

long()

count()

7.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Choose correct purpose of indexOf() in String class.

returns the index (the position) of the last occurrence of a specified text in a string

returns the character of the first occurrence of a specified character in a string

returns the index (the position) of the first occurrence of a specified text in a string (excluding whitespace)

returns the index (the position) of the first occurrence of a specified text in a string (including whitespace)

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?