Suriin ang malawak na saklaw ng mga paksa sa IDNStudy.com. Makakuha ng mabilis at eksaktong sagot sa iyong mga tanong mula sa aming mga eksperto na laging handang tumulong.

Write a Java program that will display the sum of x and y​

Sagot :

SumOfNumbers4.java

public class SumOfNumbers4.

{

public static void main(String args[])

{

int x = Integer.parseInt(args[0]); //first arguments.

int y = Integer.parseInt(args[1]); //second arguments.

int sum = x + y;

Systemout.printl("The sum of x and y is: " +sum);