Find if the given points form an isosceles triangle - Java Quiz Question


Write a program to find if the given points form an isosceles triangle.

Input (Point, Point, Point) Output (boolean)
[0, 0], [50, 0], [25, 43.3] true
[-7, 0], [3, 0], [3, 10] true
[5, 0], [8, 0], [6.5, 9] true
[-8, 0], [4, 0], [6, 3] false
[0, -3], [3, -3], [21, -3] false



class IsAnIsoscelesTriangle
{
    public static void main(String s[])
    {
        Point firstPoint = new Point(-7, 0);
        Point secondPoint = new Point(3, 0);
        Point thirdPoint = new Point(3, 10);
        System.out.println("Given points form an isosceles triangle : " + isAnIsoscelesTriangle(firstPoint, secondPoint, thirdPoint));

    }


    public static boolean isAnIsoscelesTriangle(Point firstPoint, Point secondPoint, Point thirdPoint) {
    }
    

}
class Point {

double x;
double y;

Point(double x, double y) {
this.x = x;
this.y = y;
}
}