0
public static void main(String[] args) {
                Set<Point> points = new HashSet<Point>();
                points.add(); --- how to add point of "Point" type
                cureAlgor(0.01, 3,points);
}

Point is a pre-defined class.
I want to know what to wrtie in points.add().
Please help!

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by NormR1
0

how to add point of "Point" type

Define an instance of a Point class object and pass it to the add() method:
Point aPt = new Point();
points.add(aPt);

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.