Find if the given points form a right angled triangle - Java Quiz Question


Write a program to find if the given points form a right angled triangle.

Input (Point, Point, Point) Output (boolean)
[0, 0], [25, 0], [0, 25] true
[-10, 0], [0, 0], [0, 10] true
[50, 0], [0, 50], [0, 0] true
[-10, 5], [0, 5], [0, -5] true
[3, 18], [2, 14], [0, 0] false
[-8, 4], [-4, 2], [4, -2] false



class IsARightAngledTriangle
{
    public static void main(String s[])
    {
        Point firstPoint = new Point(0, 0);
        Point secondPoint = new Point(25, 0);
        Point thirdPoint = new Point(0, 25);
        System.out.println("Given points form a right angled triangle : " + isARightAngledTriangle(firstPoint, secondPoint, thirdPoint));

    }


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

}
class Point {

double x;
double y;

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