1510 Chapter 2

1510 Chapter 2

University

•

41 Qs

quiz-placeholder

Similar activities

Data Structures Quiz

Data Structures Quiz

University

•

44 Qs

Eng-103 Vocab1

Eng-103 Vocab1

University

•

40 Qs

Excel tercel parcial licenciatura

Excel tercel parcial licenciatura

9th Grade - University

•

36 Qs

Introduction to Computer

Introduction to Computer

University

•

40 Qs

TIK kelas 7, Penilaian Tengah semester

TIK kelas 7, Penilaian Tengah semester

7th Grade - University

•

40 Qs

Quiz sobre Diseño Gráfico y Tipos de Archivos de Imagen

Quiz sobre Diseño Gráfico y Tipos de Archivos de Imagen

10th Grade - University

•

45 Qs

C++ Internal Assessment

C++ Internal Assessment

University

•

40 Qs

Photoshop Terms and Controls

Photoshop Terms and Controls

9th Grade - University

•

38 Qs

1510 Chapter 2

1510 Chapter 2

Assessment

Quiz

•

Computers

•

University

•

Practice Problem

•

Medium

Created by

Bhavnoor Saroya

Used 26+ times

FREE Resource

AI

Enhance your content in a minute

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

41 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

If x is a String, then x = new String("OH"); and x = "OH"; will accomplish the same thing.

True

False

Answer explanation

fun fact: this is the "most correct" answer by Bruce's standards, but they dont quite do the same thing. Strings of the same value initialized via literals end up referencing the same bytes in memory. This is called "string pooling". Using the String constructor guarantees that new memory will be allocated for the String.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

If x is the String "Hi There", then x.toUpperCase().toLowerCase(); will return the original value of x.

True

False

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

If String name = "Bruce"; then the instruction name.length(); will return 5.

True

False

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

If String a = "ABCD" and String b = "abcd" then a.equals(b); returns false but a.equalsIgnoreCase(b); returns true.

True

False

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Unlike the String class where you must pass a message to an object (instance) of the class, as in x.length(), in order to use either the Scanner or Math classes, you pass messages directly to the class name, as in Math.abs() or scan.nextInt().

True

False

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In order to generate a random number, you must use Math.random().

True

False

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A double is wider than a float and a float is wider than an int.

True

False

Create a free account and access millions of resources

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?