문제

public static void rainbows() {
    Console console = System.console();
    double F = Double.parseDouble(console.readLine("Enter Fahrenheit: "));
    System.out.print("The Degrees in Celsius is: " + ((F - 32) * (5.0/9)));

This is the Method I would like to invoke in my Main method. How do I invoke it without parameters?

도움이 되었습니까?

해결책

public class MyClass {
    public static void main(final String[] args) {
        rainbows();
    }

    // your method here
}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top