You're doing int division which always returns an int. For example 5/9
returns 0.
Instead use double division 5.0/9.0
For your code:
public static double celsius (double fahrenheit) {
return (fahrenheit - 32) / (5.0 / 9.0);
}
We should probably close this question as a duplicate as it's been asked many many times. For example: fahrenheit-to-celsius-conversion-yields-only-0-0-and-0-0