Take 2 Input From User And Perform Addition In Java Code Example

Snippet 1
  public class AddTwoNumbers {

   public static void main(String[] args) {
        
      int num1 = 5, num2 = 15, sum;
      sum = num1 + num2;

      System.out.println("Sum of these numbers: "+sum);
   }
} 

Similar Snippets


Creating Java Main Method Code Example - java

Create Copy Of Array From Another Array Code Example - java

Firestore Find Doc And Set Data Code Example - java

Find Duplicates In Arraylist Java Code Example - java

Java Creat A Folder Code Example - java