created 11/28/99; 01/24/00

CHAPTER 49B --- Arrays of Objects
and Linear Search

All the elements of an array must be of the same type. So far in these notes, the elements have been primitive types int,double, and char. However, array elements can be any data type, including object references. This chapter will discuss arrays of object references.

Often a program needs to search an array to find a particular item of data. There are many ways to search an array; this chapter will discuss linear search.

Chapter Topics:

  • Arrays of Object References.
  • Arrays of String References.
  • Linear Search of an Array.
  • Phone Directory Application.

QUESTION 1:

What does this statement do?      
String str;
Click Here after you have answered the question