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

HELP ME How has the discovery and usage of the periodic table benefited society? Select all that apply It has enabled scientists to communicate chemical discov
(50 POINTS) Set the ball and the barrier about two feet apart on the table. Grasp both ends of the ruler. Push the ball using the center of the ruler so the b
What is the common ratio between successive terms in the sequence? 27, 9, 3, 1, , , , ... –3 – 3
A client is admitted to the surgical unit from the postanesthesia care unit with a Salem sump nasogastric tube that is to be attached to wall suction. Which nur
y−3=2(x+1) Complete the missing value in the solution to the equation. ( -1, _ )
If the perimeter of the rectangle is 30 cm and value of j is 8. a) Create an equation that you can use to find the value of h b) Solve the equation. What is the
which food would give the strongest positive test for lipids
what's binding means
Which kingdom includes only multi cellular heterotrophs whose cells lack a cell wall
Which of the following is the best definition of a scientific theory?Help me plz