Write a public method in the class Test below that has the signature printMax(int, int) and does not return any value.

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
correctanswer
Posts: 43759
Joined: Sat Aug 07, 2021 7:38 am

Write a public method in the class Test below that has the signature printMax(int, int) and does not return any value.

Post by correctanswer »

Write a public method in the class Test below that has
the signature printMax(int, int) and does not return any
value. The parameters indicate indexes into
the nums array.

The method prints out the largest integer found in
the nums array from the element indexed by the first
parameter through to the element indexed by the second
parameter.
The output is of the form
5db2d079877146bf91f72ab11f65d48c
where n is the largest element found.
You do not have to perform any checks on the parameters to see
whether they are in bounds for the array.
This question is copyright The Open University UK.
5db2d079877146bf91f72ab11f65d48c
For example:
Register for solutions, replies, and use board search function. Answer Happy Forum is an archive of questions covering all technical subjects across the Internet.
Post Reply