February 2014
Beginner
1248 pages
62h 25m
English
Another common use for accessor methods is to test whether a condition is true or false—such methods are often called predicate methods. An example would be class ArrayList’s isEmpty method, which returns true if the ArrayList is empty and false otherwise. A program might test isEmpty before attempting to read another item from an ArrayList.
Read now
Unlock full access