Question

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?

Was it helpful?

Solution

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

    // your method here
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top