Search Header Logo

Plenary Day 2

Authored by D Veena

Computers, Other

Used 1+ times

Plenary Day 2
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

String s1 = "goat";

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

What is the value of z?

goa

goat

This code will not compile.

StringIndexOutOfBoundsException

2.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

String s = "cool cat".substring(6);


What is the value of s?

"cat"

"at"

"cool c"

This code does not compile.

StringIndexOutOfBoundsException

3.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

String s = "whatever".substring(1,4);


What is the value of s?

"hate"

"hat"

"whate"

"what"

StringIndexOutOfBoundsException

4.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

String s = "good job".substring(3, 9);


What is the value of s?

"d job"

"od job"

"d jo"

"od jo"

StringIndexOutOfBoundsException

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

true
false

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?