
addition of two numbers

import java.util.*;
class AddNumbers
{
public static void main(String[] args)
{
Scanner input=new Scanner(System.in);
System.out.print("Enter first number: ");
int num1=input.nextInt();
System.out.print("Enter second number: ");
int num2=input.nextInt();
int sum=num1+num2;
System.out.println("Result is: "+sum);
}
}

i tried this code in netbeans IDE 5.0 Error error shown in "Scanner input = new scanner (System.in);" Can u help me out, which directory should import for this scanner
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.