CS 2401 Quiz #2

Date: Tuesday, August 30, 2011.

1. You are given two arrays of doubles named Arr1 and Arr2. Write a method that will determine if these two arrays contain the same elements. If all of the elements are identical, return true, otherwise return false.










































2. Trace your code on an example with Arr1 containing elements 2.0, 4.5, and 8.1, and Arr2 having elements 2.0, 4.5 and 8.1.










































Turn over, please.

2. Please answer questions about the reading assignment:

2a. What is the maximum number of dimensions an array can have?

2b. What mechanism for handling errors in Java is discussed in Chapter 1?

2c. There are three types of loops in Java. What are they?