public class happy { public static void main(String[] args) { Scanner num = new Scanner (System.in); int first, second, result; System.out.print("Enter first num: "); first = num.nextInt(); System.out.print("Enter second num: "); second = num.nextInt(); result = first + second; System.out.println("It is" + result + "!!!"); } }
happy.java:3: error: cannot find symbol Scanner num = new Scanner (System.in); ^ symbol: class Scanner location: class happy happy.java:3: error: cannot find symbol Scanner num = new Scanner (System.in); ^ symbol: class Scanner location: class happy 2 errors