I have done this fine, it works in Intellij Id but on codegym it just throws exceptions I dunno why.
package com.codegym.task.task04.task0423;
/*
Bouncer policy
*/
import java.io.*;
import java.util.Scanner;
public class Solution {
public static void main(String[] args) throws Exception {
//write your code here
Scanner sc = new Scanner(System.in);
int name = sc.nextInt();
int age = sc.nextInt();
if (age > 20) {
System.out.println("18 is old enough");
}
else {
System.out.println("");
}
}
}