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

This is formed as a waste product in photosynthesis and used as a reactant in respiration.
Which planet has the largest moon in our solar system
VY Canis Majoris is located in the constellation Canus Minor. True False
Solve the inequality represented by this situation: Six times a numberis greater than 2 less than 4 times the same number.​
What is historical or collective memory​
What is the difference between a law and a regulation?A. A law is a rule that is written by thegovernment, and a regulation is a description of how the law shou
What is the empirical formula for a compound that contains 79.86 % iodine and 20.14 % oxygen by mass?
To build the roof for a paper house, a rectangular paper
A binomial experiment is conducted with 7 trials. Each trial has a probability of 0.75 for success. a) Which of these is a theoretical probability P(r) for r tr
Solveee 3x^2 - 9 = 0