HiT - Quiz 2

HiT - Quiz 2

Professional Development

26 Qs

quiz-placeholder

Similar activities

Java Chapter 3 Review Questions

Java Chapter 3 Review Questions

Professional Development

25 Qs

Part III-Practice Study Guide (ITF+)

Part III-Practice Study Guide (ITF+)

Professional Development

26 Qs

Library IT Trivia

Library IT Trivia

Professional Development

21 Qs

Keyboard Skills

Keyboard Skills

Professional Development

22 Qs

Previos

Previos

Professional Development

23 Qs

LIST-TUPLES-SET-DICTIONARY

LIST-TUPLES-SET-DICTIONARY

Professional Development

25 Qs

TUGAS ULANGAN KELAS 1

TUGAS ULANGAN KELAS 1

Professional Development

25 Qs

Ujian SK Tingkatan 4 - Bab 1

Ujian SK Tingkatan 4 - Bab 1

1st Grade - Professional Development

25 Qs

HiT - Quiz 2

HiT - Quiz 2

Assessment

Quiz

Computers

Professional Development

Practice Problem

Medium

Created by

Venkatesh iGen

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...

26 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

int len = "jump it!".length();


What is the value of len?

8

7

9

6

This code does not compile.

2.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

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


What is the value of s?

"hate"

"hat"

"whate"

"what"

StringIndexOutOfBoundsException

3.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

int p = "Go Paw Patrol!".indexOf("p");


What is the value of p?

0

4

3

-1

This code will not compile.

4.

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

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

int x = "Mary".compareTo("Molly");

if (x>=0) System.out.print("Yes");

else System.out.print("No");


What is the output?

Yes

No

There is no output.

This code will not compile.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

String s1 = "goat";

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

boolean z = s1.equals(s2);


What is the value of z?

true

false

This code will not compile.

StringIndexOutOfBoundsException

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

Which code segment should go in the blank so that count is equal to the number of times "whoa" occurs in str?

str.length() -2

str.length() -4

str.length() - 3

str.length() - 1

str.length()

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?