Filters
Question type

Study Flashcards

How are arrays tested to see if they contain the same contents?

Correct Answer

verifed

verified

The best way to test two arrays to see i...

View Answer

Given the following character array char[] h = {'H','E','L','L','O'}; Write a Java statement that will create a new String object from the character array.

Correct Answer

verifed

verified

String s =...

View Answer

A collection class is a class whose objects store a collection of values.

A) True
B) False

Correct Answer

verifed

verified

Which of the following initializer lists correctly initializes the indexed variables of an array named myDoubles?


A) double myDoubles[double] = {0.0,1.0,1.5,2.0,2.5};
B) double myDoubles[5] = new double(0.0,1.0,1.5,2.0,2.5) ;
C) double[] myDoubles = {0.0,1.0,1.5,2.0,2.5};
D) array myDoubles[double] = {0.0,1.0,1.5,2.0,2.5};

E) C) and D)
F) B) and D)

Correct Answer

verifed

verified

You may cycle through elements of a collection object using a for loop.

A) True
B) False

Correct Answer

verifed

verified

An array name references a memory address.

A) True
B) False

Correct Answer

verifed

verified

Write a Java method as well as any facilitator methods needed to perform a sort on an array of whole numbers in descending order.

Correct Answer

verifed

verified

/** Precondition: The array has values. ...

View Answer

Showing 41 - 47 of 47

Related Exams

Show Answer