Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Java Programming Part 4 (Lab2b) Make sure that you are done with Labza before you move on to this part. In this exercise you will
Java Programming
Part 4 (Lab2b) Make sure that you are done with Labza before you move on to this part. In this exercise you will a. Use two methods from the Math library, namely max and min. Here is a quick introduction to these methods: they each take two numeric inputs (i.e. arguments) and return whichever number is the maximum or minimum (depending on if you are using max or min) of the two. Let's try them out! In main, declare and initialize variables as follows: double maxNumber1 = Math . max (22 . 3 , 34 . 5) ; double minNumber1 = Math. min (3 . 6/7.2, 3 . 8/6. 9) ; double maxNumber2 = Math.max (2/3, 0.1) ; double minNumber2 = Math . min (13 . 5555, 13 . 5556) ; What are their values? Write them down somewhere. Now print them to the screen, did you get what you expected? If not, reflect on the reason and ask someone. Make sure you understand how to use these methods before proceeding
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started