Program for adding two integers

Java code posted by Vaibhav Borkar
created at 27 Aug 03:16

Edit | Back
1
2
3
4
5
6
7
8
9
10
11
12
class Main {

  public static void main(String[] args) {
    
    int first = 10;
    int second = 20;

    // add two numbers
    int sum = first + second;
    System.out.println(first + " + " + second + " = "  + sum);
  }
}
236 Bytes in 12 ms with coderay