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

The greenhouse effect traps the sun's energy on Earth similar to A. a pot on a hot stove B. a microwave C. a space heater in a room D. a car parked in
The source of the earth's magnetic field is the: a. sun b. moon c. oceans d. core
why did the creation of latifundia cause poor people to move to cities??
what is the purpose of annotating mail?
How does the author use fictional elements to develop a theme in Look Homeward Angel?
1/8 is it greater or lesser than 1/4
Throughout history, people have turned great ideas into useful inventions. Which word is the direct object?
Describe common types of medication including their effects and potential side-effects?
what are some recent events that happened in nebraska
Force out is what? (baseball) A. When a player hits the ball in the air and it's caught by a defensive player before the ball hits the ground B. When a ru