ObjectsAsVariableLengthParametersVerII

ObjectsAsVariableLengthParametersVerII - //Line 6 a...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
y public class ObjectsAsVariableLengthParametersVerII { public static void main(String[] args) { Clock myClock = new Clock(12, 5, 10); //Line 1 Clock yourClock = new Clock(8, 15, 6); //Line 2 C Clock[] arrivalTimeEmp = new Clock[10]; //Line 3 for (int j = 0; j < arrivalTimeEmp.length; j++) //Line 4 arrivalTimeEmp[j] = new Clock(); //Line 5 arrivalTimeEmp[5].setTime(8, 5, 10);
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: //Line 6 a printTimes(myClock, yourClock); //Line 7 System.out.println(&quot;\n******************&quot; + &quot;******* \n&quot;); //Line 8 printTimes(arrivalTimeEmp); //Line 9 } public static void printTimes(Clock . .. clockList) { for (Clock clockObject : clockList) //Line 10 System.out.println(clockObject); //Line 11 } }...
View Full Document

Ask a homework question - tutors are online