It is calculating correct result but still saying validation 4 not passed.
package com.codegym.task.task06.task0609;
/*
Distance between two points
*/
public class Util {
public static double getDistance(int x1, int y1, int x2, int y2) {
double distance = (Math.pow((x2-x1),2) - Math.pow((y2-y1),2));
//double distsquare = Math.sqrt(distance);
return (Math.sqrt(distance));
}
public static void main(String[] args) {
// Util test = new Util();
// double dist = Util.getDistance(2,3,7,5);
// System.out.println(dist);
}
}