Java Substring 10.18

Java Substring 10.18

10th Grade

11 Qs

quiz-placeholder

Similar activities

Javascript Again 1114

Javascript Again 1114

10th Grade

14 Qs

 Unit 4 Advanced AP CSP

Unit 4 Advanced AP CSP

9th - 12th Grade

10 Qs

Python programming

Python programming

6th - 12th Grade

16 Qs

OCR 1.1 Systems Architecture Revision

OCR 1.1 Systems Architecture Revision

9th - 11th Grade

16 Qs

U1L2 Gossip Review

U1L2 Gossip Review

9th - 12th Grade

10 Qs

Laser Defender Part 2 Worksheet

Laser Defender Part 2 Worksheet

9th - 12th Grade

15 Qs

Nhanh tay- Nhanh trí - Bài 1-Tin9

Nhanh tay- Nhanh trí - Bài 1-Tin9

7th Grade - University

10 Qs

Code Evaluation Practice, 1/23

Code Evaluation Practice, 1/23

9th - 11th Grade

10 Qs

Java Substring 10.18

Java Substring 10.18

Assessment

Quiz

Computers

10th Grade

Practice Problem

Hard

Created by

Arasaka Teacher

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

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

11 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

String str = "level nail";

System.out.println(str.substring(a,b) + str.substring(c));

Which values of a, b, and c will cause the program to output the word "evil"?

a=1 b=3 c=8

a=0 b=2 c=7

a=1 b=2 c=8

a=1 b=3 c=7

a=2 b=4 c=9

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

String s1 = "California Golden Bears";

String s2 = s1.substring(11, 13) +  s1.substring(10, 11) + s1.substring(18) + "!";

What is the value of s2 after the code executes?

"Go Bears!"

"GoBears!"

" Gaa!"

"Go B!"

"Gol Bears!"

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the value of pos after the following code executes?

String s1 = "abccba";

int pos = s1.indexOf("b");

2

1

4

-1

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the value of len after the following code executes?

String s1 = "baby";

int len = s1.length();

2

3

4

-1

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the value of s2 after the following code executes?

String s1 = "baby";

String s2 = s1.substring(0, 3);

baby

b

ba

bab

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the value of len after the following code executes?

String s1 = "Miss you!";

int len = s1.length();

7

8

9

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the value of s2 after the following code executes?

String s1 = "baby";

String s2 = s1.substring(2);

by

aby

a

b

ba

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?