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

How is the motif of “nature” developed throughout the short story “The Interlopers?”
What does a strong conclusion include? a. pictures b. argumentation c. new statistics d. logic
In the text, the author writes, "The Constitution's starting point is limited government." What does this mear
Écoutez Sabine et Marc parler de leurs passe-temps préférés. Indiquez qui pratique chaque activité. Attention! Parfois personne (no one) ne les pratique. Questi
How did the expansion of the Ottoman Empire affect global trade? Ottoman traders were unable to purchase goods from Europe. Virtually all goods between Europe a
N is covered under an individual Disability policy with a 30-day Elimination period and a monthly benefit of $500. N is totally disabled for 3 1/2 months. N's t
In the ancient world, why did civilizations florist around great river valleys?
the product of 5 and g
6. PART B: Which of the following best supports the answer to Part A?
2. Who was the first Avenger to crumble to dust following Thanos' snap? A. Captain America B. Black Panther C. Bucky Barnes D. The Hulk