Question: Java Consider the following static method: public static Point highestPoint (List points) ( Iterator pointIterator points.iterator() int highest Point highestPoint = null; // TODO use

Java

Java Consider the following static method: public static Point highestPoint (List points)

Consider the following static method: public static Point highestPoint (List points) ( Iterator pointIterator points.iterator() int highest Point highestPoint = null; // TODO use the iterator to complete this method! return highestPoint; You are required to complete the static method. The static method contains an iterator of an ArrayList of Point objects. You should use a loop and the pointIterator to check the point with the largest Y value. Retums the point with the largest Y value. Insert statements in the answer box below For example Test Result List points -new LinkedList;java.awt.Point[x-3,y-8] points.add(new Point (1, 1)) points.add (new Point (1, 3)) points.add (new Point (3, 1)) points.add (new Point (3, 8)); System.out.println(highestPoint (points))

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!