Java Program to Add Two Numbers

Java Programming Java8Object Oriented ProgrammingJava Technologies

 public class MyFirstJavaProgram {

   /* This is my first java program.
    * This will add two numbers
    */

   public static void main(String []args) {
      int a = 3, b = 4;
      Int sum = a + b;
      System.out.println(sum); // prints 7
   }
}
raja
Published on 19-Jan-2018 10:09:41
Advertisements