/* * To change this template, choose Tools | Templates * and open the template in the editor. */ /** * * @author Anousha */ import java.util.Scanner; public class ScannerDemo { public static void main (String [] args) { Scanner myScanner = new Scanner (System.in); System.out.println ("Please input a number: "); int num1 = myScanner.nextInt(); System.out.println ("Please input another number: "); int num2 = myScanner.nextInt(); int result = num1 + num2; System.out.println ("The result is: "+ result); } }