Range check
From Wikipedia, the free encyclopedia
It has been suggested that this article or section be merged into bounds checking. (Discuss) |
In computer programming, a range check is a check to make sure a number is within a certain range. This is often used with arrays, as using a number outside of the upper range in an array may cause the program to crash, or may introduce security vulnerabilities (see buffer overflow). In Java, the interpreter automatically does a range-check when items in an array are accessed, and throws an exception if the item is out of range. See bounds checking.