Could someone tell me what I am doing wrong? Below is the code and here is the error I get:
/*
Use the keyboard to enter the name and age. If the age is less than 18, display "Grow up a little more".
*/
package com.codegym.task.task04.task0422;
/*
18+
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
//write your code here
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
System.out.println("Please enter your Name");
String name = reader.readLine();
System.out.println("Please enter your age");
String ageInputed = reader.readLine();
int age = Integer.parseInt(ageInputed);
if(age < 18) {
System.out.println("Grow up a little more");
}
}
}