How would you use a method that belongs to an object that is part of the array? Use an example and demonstrate with Java code.
What will be an ideal response?
To use a method that belongs to an object that is part of an array, you insert the appropriate subscript notation after the array name and before the dot that precedes the method name. For example, to display data for seven Employees stored in the emps array, you can write the following:??for(int x = 0; x < emps.length; ++x)
System.out.println (emps[x].getEmpNum() + " " + emps[x].getSalary());
You might also like to view...
Stereo provides a richer sound than mono, but at the expense of approximately quadrupling the size of the sound file.
Answer the following statement true (T) or false (F)
A(n) ____ is a circuit that performs binary addition on two unsigned N-bit integers.
A. adding circuit B. compare for equality C. full adder D. calculator