Misconceptions Check

Misconceptions Check

9th - 12th Grade

15 Qs

quiz-placeholder

Similar activities

AP CSA Review

AP CSA Review

11th Grade

14 Qs

Arrays by Swarn

Arrays by Swarn

10th Grade

10 Qs

Single Array

Single Array

10th - 12th Grade

15 Qs

Array

Array

12th Grade

20 Qs

Unit 8 - Searching and Sorting

Unit 8 - Searching and Sorting

9th - 12th Grade

15 Qs

Arrays += Chan

Arrays += Chan

9th - 12th Grade

12 Qs

Java Array Basics

Java Array Basics

10th - 12th Grade

15 Qs

Arrays in Java

Arrays in Java

9th - 12th Grade

20 Qs

Misconceptions Check

Misconceptions Check

Assessment

Quiz

Computers

9th - 12th Grade

Easy

Created by

Manuel Alvarez

Used 8+ times

FREE Resource

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What do you use to compare Strings?

=

==

.equals()

&&

Answer explanation

= is for assigning values

== is for comparing primitive types (int, double, boolean, char)

.equals() is for comparing Objects/Strings

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What do you use to compare ints and doubles?

=

==

.equals()

||

Answer explanation

= is for assigning values

== is for comparing primitive types (int, double, boolean, char)

.equals() is for comparing Objects/Strings

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What do you use to compare chars and booleans?

=

==

.equals()

!

Answer explanation

= is for assigning values

== is for comparing primitive types (int, double, boolean, char)

.equals() is for comparing Objects/Strings

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following the correct way to initialize a String variable?

string str = "Monday";

String str = "Monday";

String str = 'Monday';

string str = 'Monday';

Answer explanation

String is a java class, unlike the primitive types (int, double, float, char). All classes should start with an uppercase letter. You know a String is a class because it has its own methods.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The indexes of elements in a Java array always start with _.

0

1

2

3

Answer explanation

When you construct an array int [] arr = new int[ 10 ] ; 10 refers to the length, which is the number of elements in the array. The index of those elements begins with 0.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the length of this String: "Bread"

2

3

4

5

Answer explanation

The length of a string is the number of characters in it. The index is the position of any character or set of characters within the string. Length starts counting with 1 and index starts with 0.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What index number is the "d" in the String: "Bread"

2

3

4

5

Answer explanation

The length of a string is the number of characters in it. The index is the position of any character or set of characters within the string. Length starts counting with 1 and index starts with 0.

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?