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

i need help !!!!!!!!!!!!!!!
How to calculate roots when the equation is non quadratic?
8. The Wilson family was one of the first to come to the U.S. They had 6 children. Assuming that the probability of a child being a girl is 0.5, find the probab
Please help me please
A transverse wave with a frequency of 125 Hz is traveling in the x-direction. How long will it take this wave to travel 3000 m in the x-direction? 0.42 secon
St. jude's hospital decides to redo its kitchen with new flooring, cabinets, counters, and appliances. the hospital compiles a description of the project and th
Which verb form best completes this sentence? Elle ————- préparer les crêpes traditionnelles. A) sait B) savent C) connaît D) connaissons
How many ureters does the urinary system contain?
the length of a rectangle is 2 centimeters greater than its width. write a function to represent the area of the rectangle.
give me the math problem that Einstein used to get the answer 3.14159. ill make the best and right answer the brainliest!!!