HomeWork Lab Java firstday (Lab1_5)

June 6, 2013 12:30 pm Homework, Java, Private
import java.util.Scanner;
	public class Lab1_5 {
		public static void main(String[] args) {
			String name;
			int a,b;
			Scanner name1 = new Scanner (System.in);
			System.out.println("Enter your name");
			name = name1.nextLine();
			Scanner a1 = new Scanner (System.in);
			System.out.println("Enter Number 1");
			a = a1.nextInt();
			System.out.println("Enter Number 2");
			Scanner b1 = new Scanner (System.in);
			b = b1.nextInt();
			System.out.println("You name is "+name);
			System.out.println("Sum is "+(a+b));
 
		}
	}