Question: Write a method called max that takes two integers as input and returns the larger of the two. That is , complete the function public
Write a method called max that takes two integers as input and returns the larger of the two. That is complete the function public static int maxint a int b so that it returns the larger of a or b using an if statement hint: lab # has a similar question, using Math methods. Your job is to build a method that will perform the same functionality as Math.max
Ask the user for two integers using a Scanner and report the largest and smallest values using the max method you just built. Consider the following output:
sample output for problem
Enter two integers:
Largest is
Smallest is
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
