WAP to find sum of two numbers.

1 year ago
OOP Java

Compile code:

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

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

 

Output:

 

0
Dipti KC
Jan 8, 2023
More related questions

Questions Bank

View all Questions