Henry Swanson
Henry Swanson

Reputation: 23

Method printFromNumberToOne(int) of class FromParameterToOne missing

This code is supposed to count from an inputted parameter from a user, pass it to a function, and it counts it down to one. I believe the program acts as it should, the problem is that it doesn't pass Mooc.fi's tests.

public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    
    int number = Integer.valueOf(scanner.nextLine());
         
    printFromNumbertoOne(number);
}
public static void printFromNumbertoOne(int number) {
    for (int i = number; i > 0; i--) {
        System.out.println(i);
    }

The error I'm receiving is:

Method printFromNumberToOne(int) of class FromParameterToOne missing

What am I missing? And is there a way to check the test cases? Mooc.fi seems like it's very picky on what it takes for answers.

Upvotes: 0

Views: 251

Answers (1)

Henry Swanson
Henry Swanson

Reputation: 23

Camel case of the method; it should be printFromNumberToOne.

Upvotes: 0

Related Questions