Sort Arrays

Learn about two overloaded methods for sorting integers and doubles.

Challenge

Write a program that contains the overloaded function sort( ) to arrange in ascending order the integers (int) or doubles (double) passed to it.

Coding exercise

Try to solve this challenge on your own. If you can’t solve it, you can look at the solution and explanation below.

Get hands-on with 1200+ tech skills courses.