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

Evidence about Dalton's atomic theory has shown that A. all of Dalton's hypotheses were correct. B. atoms of an element can have different numbers of protons
The perimeter of a rectangle is 420 yd. if its width is six times its length; what is the area of the rectangle?
heeeelp me plz i will give brainliest
Find the perimeter of rectangle PQRS with vertices P(0,0), Q(0,7), R(12,7) & S (12,0). Select one: a. 26 units b. 33 units c. 38 units d. 45 units
Delivering a carefully researched, well argued, and stylistically powerful speech is more important than connecting with an audience. true or false
Like heroin, and cough syrup with codeine, can make a driver drowsy and unable to concentrate
The quotient Of triple a number and 9 is decreased by the sum of the number and 5? Expression please
Why is environmental degradation a growing concern in both the developing and the industrialized world? A. Because it leads to more consumption in the develo
Can someone please help me with this math question?(asap:)
explain how the nettle is adapted for defence and protection