I'm very very new to Java. I got stuck in this error where it states:

> 
> The constructor Scanner() is undefined
> 
> 
> 

and

> 
> The method nextInt(int) in the type Scanner is not applicable for the arguments (InputStream).
> 
> 
> 

```
import java.util.Random;
import java.util.Scanner;

public class NumberGenerator
{
    public static void main(String[] args)
    {
        Scanner input = new Scanner();
        Random randomNumber = new Random();
        System.out.println("Please enter the maximum value: ");
        int maxValue = input.nextInt(System.in);
        for (int counter = 1; counter <= 1; counter++)
        {
            int number = randomNumber.nextInt(maxValue);
            System.out.println("Your random number is: " + number);
        }
    }
}

```

As you may be able to see, I'm very new and I really appreciate your help.