Answer:
public static int maxMagnitude(int a, int b){
int max;
if (a>b){
max = a;
}
else{
max = b;
}
return max;
}
The complete program calling the method is given in the explanation section
Explanation:
import java.util.Scanner;
public class ANot {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.println("Please Enter two numbers");
int num1= in.nextInt();
int num2 = in.nextInt();
System.out.println("The largest magnitude number is: "+maxMagnitude(num1,num2));
}
public static int maxMagnitude(int a, int b){
int max;
if (a>b){
max = a;
}
else{
max = b;
}
return max;
}
}
The maxMagnitude() method uses if/else statement to compare two ints and return the larger one
If an error occurs within a program, each of the numeric functions would return a <u>null value</u>.
<h3>What is a function?</h3>
A function refers to a named portion of a block of executable code that is written to perform a specific task, which is usually a single, related action.
Thus, a function comprises a group of related statements (block of code) that would only run and returns a data when it is called.
In Computer programming, if an error occurs within a program, each of the numeric functions would return a <u>null value</u>.
Read more on a function here: brainly.com/question/19181382
#SPJ12
Can you show a picture of the graph?
Answer:
<h2>thanks </h2><h2>may god bless you </h2>