June 2017
Beginner
1296 pages
69h 23m
English
... Character element : inputArray) {
43 System.out.printf("%s ", element);
44 }
45
46 System.out.println();
47 }
48 }
Array integerArray contains: 1 2 3 4 5 6 Array doubleArray contains: 1.1 2.2 3.3 4.4 5.5 6.6 7.7 Array characterArray contains: H E L L O
Printing array elements using overloaded methods.
The program begins by declaring and initializing three arrays—six-element Integer array integerArray (line 7), seven-element Double array doubleArray (line 8) and five-element Character array characterArray (line 9). Then lines 11–16 display the contents of each array.
When the compiler encounters a method call, it attempts to locate a method declaration with the same name and with parameters that match the argument types in the call. In this example, ...