Write a method named closeEnough that takes 3 double parameters--a value, a targ
ID: 3611614 • Letter: W
Question
Write a method named closeEnough that takes 3 double parameters--a value, a target and atolerance. The method should return a boolean indicating whetherthe value is close enough to the target, based on the tolerance. Inother words, if the absolute distance of the value to the target isless than the tolerance, the value is considered to be "closeenough" to the target. A sample main isprovided to give context:public static void main(String [] args){
Scanner keybd = newScanner(System.in);
System.out.print("Enter value, target, andtolerance,
separated by spaces: ");
double value = keybd.nextDouble();
double target = keybd.nextDouble();
double tolerance = keybd.nextDouble();
if closeEnough(value, target,tolerance)) {
System.out.println("OK");
}
}