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

Can someone please help me with #10 and #11
According to piaget’s theory, two processes underlie children’s cognitive construction of the world:
Write the equation of a line that passes through points (0,4) and (-2,-3) in slope intercept form
Please I really need help on this thank you. The table below represents a linear function f(x) and the equation represents a function g(x): x f(x) −1 −6 0 −3 1
Assume you have applied for two jobs a and b. the probability that you get an offer for job a is 0.23. the probability of being offered job b is 0.20. the proba
Throwing out all the food in a refrigerator that has stopped working overnight is an example of a
Why is trade considered mutually beneficial? Question options: A) those who participate in exchanges must always give up resources B) countries who benefit from
A tree casts a shadow 25 ft long. At the same time, a lamppost 12 ft high casts a shadow 15 ft long. How tall is the tree?
What causes light to refract
The equation using a variable.