APCSA Unit 2 String Methods

APCSA Unit 2 String Methods

9th - 12th Grade

•

39 Qs

quiz-placeholder

Similar activities

Year 11 AI GCSE

Year 11 AI GCSE

12th Grade

•

35 Qs

Cyber Skill 2023

Cyber Skill 2023

9th - 12th Grade

•

42 Qs

J808 1.5 Planning tools

J808 1.5 Planning tools

10th - 11th Grade

•

35 Qs

Computer Network

Computer Network

12th Grade - University

•

40 Qs

Ulangan Harian 1 (struktur kontrol)

Ulangan Harian 1 (struktur kontrol)

10th Grade

•

35 Qs

Unit 2 Creating Systems to Manage Information Quiz

Unit 2 Creating Systems to Manage Information Quiz

12th Grade

•

41 Qs

EmTech Quiz

EmTech Quiz

11th Grade

•

40 Qs

RPL-Web-02 (Web)

RPL-Web-02 (Web)

12th Grade - University

•

35 Qs

APCSA Unit 2 String Methods

APCSA Unit 2 String Methods

Assessment

Quiz

•

Computers

•

9th - 12th Grade

•

Practice Problem

•

Easy

Created by

Sonia Coile

Used 2+ times

FREE Resource

AI

Enhance your content in a minute

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

39 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Media Image

Choose the line that assigns "love" to str2.

str2 = str.substring(2,6);

str2 = str.substring(2,5);

str2 = str.substring(2);

str2 = str.substring(4);

2.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Media Image

Choose the line that assigns "boba." to str2.

str2 = str.substring(7);

str2 = str.substring(7,11);

str2 = str.substring(8,12);

str2 = str.substring(8);

3.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Media Image

Choose the line that assigns "I" to str2.

str2 = str.substring(0,1);

str2 = str.substring(1,2);

str2 = str.substring(0);

str2 = str.substring(1);

4.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Media Image

What is the output from running this code block?

equals method

== operator

(Nothing)

equals method

== operator

5.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Media Image

What is the result of running this code block?

"." is printed.

An exception is thrown.

"America." is printed.

"a" is printed.

6.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Media Image

What is the result of running this code block?

"." is printed.

An exception is thrown.

"America." is printed.

"a" is printed.

7.

MULTIPLE SELECT QUESTION

3 mins • 1 pt

Media Image

What method-call below could be used to determine whether str contains the String "States"? Choose all that apply.

str.contains("States")

str.indexOf("States")

str.equals("States")

str.compareTo("States")

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?