This is my code for the solution. I have always used scanner in the passed before I started taking this codeGym course. I understand that it probably wants me to use the bufferedReader, but from what I've seen the bufferedReader can only take a String value. Why do we want to use bufferedReader instead of Scanner? To me it makes more sense to use the nextInt(); followed by nextLine; rather than parsing the string to an int each time. I am also wondering why the main method has the
throws Exception
If anyone is able to explain this to me I would appreciate it, I am just trying to get a better understanding.
package club.pillowmc;

import java.util.Scanner;

public class Solution {

    public static void main(String[] args) {

        Scanner input = new Scanner(;

        String name = input.nextLine();
        int salary = input.nextInt();
        int years = input.nextInt();

        System.out.println(name + " will receive " + salary + " in " + years + " years.");