1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
marta [7]
4 years ago
11

add is a method that accepts two int arguments and returns their sum. Two int variables, euroSales and asiaSales, have already b

een declared and initialized. Another int variable, eurasiaSales, has already been declared. Write a statement that calls add to compute the sum of euroSales and asiaSales and that stores this value in eurasiaSales. Assume that add is defined in the same class that calls it.
Computers and Technology
1 answer:
Oduvanchick [21]4 years ago
8 0

Answer:

// here is code in Java.

// package

import java.util.*;

// class definition

class Main

{

   // method that return sum of two sale value

   public static int Add(int euroSales,int asiaSales)

   {

       // return the sum

       return euroSales+asiaSales;

   }

   //main method of the class

public static void main (String[] args) throws java.lang.Exception

{

   try{

    // variables

       int euroSales=100;

       int asiaSales=150;

       int eurasiaSales;

        // call the function

       eurasiaSales=Add(euroSales,asiaSales);

        // print the sum

       System.out.println("total sale is:"+eurasiaSales);

   }catch(Exception ex){

       return;}

}

}

Explanation:

Declare and initialize two variables "euroSales=100" and "asiaSales=150". Declare another variable eurasiaSales. Call the method Add() with euroSales and asiaSales as parameter. This method will add both the value and return the sum.This sum will be assigned to variable eurasiaSales.Then print the sum.

Output:

total sale is:250  

You might be interested in
How was WiFi discovered?
postnew [5]

Answer:

An Australian scientist by the name of John O'Sullivan was inspired by Stephen Hawking's theory of evaporating black holes and their subsequent radio waves. He set out to find them and prove the theory correct. (Wi-Fi was discovered on accident)

7 0
3 years ago
An inner drive to work hard and well is:
Nikolay [14]

A word ethic would be the answer

3 0
4 years ago
I paid $23.99 to subscribe for the “no adds” version.. its now been a week since then but today I’m shown adds and advertisement
Aliun [14]

contact the staffs or  it's a weekly paid item

8 0
3 years ago
What missing condition will give you the output shown?
Leokris [45]

Answer:

B

Explanation:

I hope this helps!

3 0
3 years ago
Read 2 more answers
5. Which field will provide an opening for a letter such as “Dear Mr. Smith”?
stepladder [879]
The answer is a greeting line,
3 0
3 years ago
Read 2 more answers
Other questions:
  • What is the difference between the new and open commands on the file menu
    12·1 answer
  • As you apply to college when should you apply for financial aid
    9·1 answer
  • Computer simulations can: A. accurately predict the weather a month in advance.
    11·1 answer
  • Films on Demand provides you with a digital collection of streaming videos. The database includes documentaries, educational fil
    7·1 answer
  • Is number 1 correct​
    7·2 answers
  • What do “phone-copying” systems allow investigators to do?
    9·1 answer
  • For each situation, provide a pseudocoded algorithm that would accomplish the task. Make sure to indent where appropriate.Situat
    10·1 answer
  • Plz help me of this question​
    15·1 answer
  • What is a common misconception about Agile and DevOps?
    9·1 answer
  • 1.1 give five (5) reasons why modeling is an important part of system analysis and design
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!