Write a Java method that accepts three integers and returns true if one is the middle point between the other two integers, otherwise false.

Source Code:

public class MiddlePointCheck {
public static void main(String[] args) {
boolean result = checkMiddlePoint(2, 6, 4);
System.out.println(result);
}

public static boolean checkMiddlePoint(int a, int b, int c) {
return (a + b == 2 * c) || (a + c == 2 * b) || (b + c == 2 * a);
}
}

Output: