andrusandy43 andrusandy43
  • 22-03-2021
  • Computers and Technology
contestada

Write and compile a java code to add 18+6?

Respuesta :

klekaelly
klekaelly klekaelly
  • 22-03-2021

Answer:

public class testing

{

   public static void main(String[] args)

   {

       int x = 18;

       int y = 6;

       System.out.println(addNumbers(x, y));

   }

   public static int addNumbers(int a, int b)

   {

       return a + b;

   }

}

Answer Link

Otras preguntas

How did the period of détente between the United States and the Soviet Union lead to a relaxation of authoritarian rule?
· Born in 1871 and died in 1947 · Married John Hope in 1897 · Created the Neighborhood Union for African Americans in Atlanta · Vice-President of Atlanta's NAAC
Select the word that best completes the definition of microorganism. Microorganisms are typically ____-celled and consist of bacteria, viruses, fungi, and proto
How do you say it's dark and gloomy outside in Spanish?
Only need help with The angle the road makes with horizontal
John travelled 30km in 1.5 hours Kamala travelled 42km in 2 hours. Who had the greater average speed?
Please help, thanks!
Please helppppppppppppppppppp
What was a primary cause of famine in sudan and ethiopia in the 1970s and 1980s?
One similarity found in both Egyptian and Sumerian civilizations is that each developed