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
vovikov84 [41]
3 years ago
9

Write a method maxMagnitude() with two integer input parameters that returns the largest magnitude value. Use the method in a pr

ogram that takes two integer inputs, and outputs the largest magnitude value.Ex: If the inputs are:5 7the method returns:7Ex: If the inputs are:-8 -2the method returns:-8Note: The method does not just return the largest value, which for -8 -2 would be -2. Though not necessary, you may use the absolute-value built-in math method.Your program must define and call a method:public static int maxMagnitude(int userVal1, int userVal2)What I have so far:import java.util.Scanner;public class LabProgram {/* Define your method here */public static void main(String[] args) {/* Type your code here */}
Computers and Technology
1 answer:
klio [65]3 years ago
6 0

Answer:

See the code snippet below

Explanation:

import java.util.Scanner;

public class LabProgram{

     public static void main(String[] args){

          Scanner scan = new Scanner(System.in);

          System.out.println("Please enter first number: ");

          int firstNumber = scan.nextInt();

          System.out.println("Please enter second number: ");

          int secondNumber = scan.nextInt();

          maxMagnitude(firstNumber, secondNumber);

}

     public static int maxMagnitude(int firstValue, secondValue){

         System.out.println(Math.max(firstValue, secondValue));

}

}

You might be interested in
Corey set up his presentation for delivery to his team.
N76 [4]

Answer:

If Corey wants to control the pacing of his presentation, he should adjust his playback settings. In the playback settings, he should select the default setting under "type;" this will allow him to change slides anytime. He should also click the check box under "options" that says "Change slides manually" so he can simply click on the slide whenever he is ready to move on to another slide.

Explanation:

If you don't like that answer, here's another one:

Corey knew he would need a lot of time to explain each point and that his team members would have lots of comments and questions. The best way that Corey should set up his slide show would be to make sure that he has an outline. Also, there should only be one thought per slide (never mix it). It has to be taken into account that he should have fewer words and more images/graphs.

6 0
3 years ago
The term ________ refers to fluid flow back to the pan to empty or drain a circuit.
Strike441 [17]

The term is: transmission flush

8 0
3 years ago
Who was the founder of the location-sharing site Whrrl
Lilit [14]
By Pelago, INC. Founders of Pelago are: Jeff Holden<span> and </span><span>Darren Vengroff.</span>
3 0
3 years ago
I recorded a video on my windows PC, but when i tried to play it i got this message:
Anit [1.1K]

Answer:

yes. Look up popular video repair sites and download it (unless its online) but dont just go clicking on random things you dont want to give yourself a virus XD

Explanation:

7 0
2 years ago
Read 2 more answers
There is no reason to study the works of famous photographers because they will make you less creative.
weeeeeb [17]
I think it is true because you may be ‘inspired’ by a famous artist but if you’re always being inspired by others its not 100% yours / you being creative
8 0
3 years ago
Read 2 more answers
Other questions:
  • You have a Bluetooth headset that integrates with your computer so that you can talk to partners through Microsoft Lync. This is
    6·2 answers
  • What is the use of pecil icon
    11·2 answers
  • Justin Blake and Raegan Beast anyone?? I miss Jaegan a ton and I need a fangirl to talk to.
    13·1 answer
  • Help me out here pleaseeeee
    9·2 answers
  • The Quick Access Toolbar cannot be customized and have extra commands added to it
    5·1 answer
  • What is the name for the type of flash memory that is used by mobile devices to store their apps and data?
    6·1 answer
  • me pueden ayudar con mi trabajo sii porfss si me dan la respuesta correcta y les doy la mejor coronita si​
    12·1 answer
  • Work-based learning can be defined as educational experiences that focus on
    6·1 answer
  • C++
    12·1 answer
  • Algorithm to eat orange<br><br>​
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!