2014-01-23 5 views
-2
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))); 

내 기본 메서드에서 호출 할 메서드입니다. 매개 변수없이 호출하려면 어떻게해야합니까?매개 변수없이 메소드를 호출하려면 어떻게해야합니까?

+5

그냥 rainbows()를 호출하십시오. –

+1

** 매개 변수 (**)를 사용하여 ** 메서드를 호출하는 방법을 알고 있는지 궁금합니다. 그것의 동일한 것, 유일한 차이는 _with_ 또는 _without_ 매개 변수입니다. – Baby

답변

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

    // your method here 
} 
관련 문제