December 1999
Intermediate to advanced
816 pages
20h 27m
English
The basic idea of overloading a method is that it is easier to call a method called println with varying data types, like this:
System.out.println(some String) System.out.println(some double) System.out.println(some boolean)
than to have to call special methods for each of these (the following are fictitious methods that don't exist):
System.out.printlnString(some String) System.out.printlnDouble(some double) System.out.printlnBoolean(some boolean)
In the first set of methods, I, as the programmer, don't have to remember or look up 5, 10, or 20 versions of println in order to call it for multiple data types. The Java designers thought the first form was easier. As a result, Java provides the ability for you to define multiple ...
Read now
Unlock full access