String Warm Up

String Warm Up

8th - 12th Grade

12 Qs

quiz-placeholder

Similar activities

Data Structures: 1D,2D & List

Data Structures: 1D,2D & List

11th Grade

17 Qs

Access - Lesson 14

Access - Lesson 14

9th - 12th Grade

10 Qs

Computer Science Principles: Stages 9-11 Revision

Computer Science Principles: Stages 9-11 Revision

9th - 10th Grade

10 Qs

8 Общие сведения о языке программирования Python

8 Общие сведения о языке программирования Python

8th Grade

15 Qs

TLE G9 Q3-1

TLE G9 Q3-1

9th Grade

15 Qs

Creating Webpages

Creating Webpages

6th - 8th Grade

12 Qs

ARRAYS

ARRAYS

11th - 12th Grade

10 Qs

ÔN TẬP TIN 8 GIỮA KÌ 2

ÔN TẬP TIN 8 GIỮA KÌ 2

8th Grade

13 Qs

String Warm Up

String Warm Up

Assessment

Quiz

Computers

8th - 12th Grade

Hard

Created by

Daniel Vega

Used 22+ times

FREE Resource

AI

Enhance your content in a minute

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

12 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Is String a primitive data type?

Yes

No

Both

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method to use to find length of a string?

length()

size()

long()

count()

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

double

String

int

number

4.

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);

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which is correct method to convert String into uppercase

changeUpperCase()

convertUpperCase()

toUpper()

toUpperCase()

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

String txt = "Hello World";

System.out.println(txt.toUpperCase());


Choose the correct output.

"HELLO WORLD"

HELLO WORLD

Hello world

Hello World

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?