Some common array programming mistakes are:
Runtime error: Forgetting that array subscripts start with zero. OR Going out of bound
Compile-time error: Writing a.length() instead of a.length. The length() method is used with Strings, not arrays.
Compile-time error: Declaring an array with a size. Eg, int[100] a; instead of int[] a = new int[100];.
Tuesday, 17 May 2011
Arrays and exceptions in java
Labels:
array/1DArray,
Arrays,
Arrays-tutorial,
exception,
java
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment