Java Input errors

I am new to Java and I am trying to understand this code that is supposed to:
Example 1.1 Write a class that has the following methods:
• public int sumOfDigits(int n) — to find the sum of the integer parameter’s digits and return the
result.
• public void inputAndProcess(Input in) — to input an integer, call sumOfDigits and display the
result.
Hint: % is the division operator that returns the remainder. Try using it to divide by 10.
Answer:

package com.example.java;
class Main
{
public int sumOfDigits(int n)
{
    int sum = 0;
    n = Math.abs(n);
    while (n > 0)
    {
        sum += n % 10;
        n /= 10;
    }
    return sum;
}
public void inputAndProcess()
{
    Input in = new Input();
    System.out.print("Type an integer: ");
    int n = in.nextInt();
    System.out.print("The sum of the digits of: " + n);
    System.out.println(" is: " + sumOfDigits(n));
}
public static void main(String[] args)
{
    new Main().inputAndProcess();
}

}

I am getting these errors:

Error:(17, 9) java: cannot find symbol
symbol: class Input
location: class com.example.java.Main
Error:(17, 24) java: cannot find symbol
symbol: class Input
location: class com.example.java.Main