9.8 Summary


9.8 Summary

Arrays are data structures capable of storing a number of different values of the same type. Each of these values is known as an element. The type of an array can be a simple type or can be a class. To refer to an individual element, an integer value, known as the index, is used to indicate the relative position of the element in the array.

Arrays are static data structures; after the array has been declared, the capacity of the array cannot be changed. Various practical problems can be solved using arrays. Searching involves finding an element in the array with a target value. Two important search algorithms are linear search and binary search. Sorting involves rearranging the elements of an array in some particular order of their values. In Java, arrays are considered objects; they need to be declared and created.




Object-Oriented Programming(c) From Problem Solving to Java
Object-Oriented Programming (From Problem Solving to JAVA) (Charles River Media Programming)
ISBN: 1584502878
EAN: 2147483647
Year: 2005
Pages: 184

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net