Search Header Logo

Java 38-988 practice

Authored by Brian Bass

Computers

10th Grade

Used 22+ times

Java 38-988 practice
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

25 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

s1 and s2 refer to the same object in memory?

True

False

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

s2 and s3 refer to the same object in memory?

True

False

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

a different string can be assigned to s2 on line 05.

True

False

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

You work as a Java programmer.

You need to convert a numeric String to a primitive double value.

What code segment should you use?

Double.valueOf(numberString);

double.parseDouble(numberString);

String.parseDouble(numberString);

Double.parseDouble(numberString);

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which int data type would you use to store the numeric value 3,000,000,000 (3 billion) so that the least amount of memory is used.

short

byte

long

int

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

You need to evaluate the following code segment:


double dNum = 2.667;

int iNum = 0;

iNum = (int)dNum;


What happens when the code segment is run?

iNum has a value of 0.

An exception is thrown.

iNum has a value of 2.

iNum has a value of 3.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

You are writing a Java method.

The program must meet the following requirements:

-> Accept a String parameter firstName

-> Display a welcome message that contains firstName

-> Ensure that the first letter of the name is capitalized, and the remaining letters are in lowercase

What would be the correct order for answers?

charAt substring toLowerCase toUpperCase

substring charAt toLowerCase toUpperCase

substring charAt toUpperCase toLowerCase

charAt substring toUpperCase toLowerCase

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?