Sum of Two Numbers in Java

import java.io.*;
class Addition {
 public static void main(String args[]) throws Exception {
  int a, b, c;
  BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
  System.out.println("Enter the two numbers to add:");
  a = Integer.parseInt(br.readLine());
  b = Integer.parseInt(br.readLine());
  c = a + b;
  System.out.println("\nSum of two numbers:" + c);
 }
}


Output:
Enter the two numbers to add:
2
3
Sum of two numbers:5

Explanation : Buffered reader's input line gets the input from user by default is String is returned.
Integer.parseint method converts string to integer
addition is performed using addition operator '+' and the output is stored in variable c
System.out.println prints the output in console