CS 2401 Quiz #2

Date: Monday, August 29, 2011.

1. You are given two arrays of integers 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 3, 7, and 9, and Arr2 having elements 3, 7 and 15.










































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?