Computer Science, asked by FriendlyAditya, 9 months ago

write down a Java program to calculate sum of two numbers taking a method ko​

Answers

Answered by briggs
1

Answer:

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 questions