Git Product home page Git Product logo

Comments (1)

philippabele avatar philippabele commented on July 29, 2024

In this challenge, I want you to: 

Create a program using arrays, that sorts a list of integers,
in descending order.  Descending order means from highest value to lowest. 
In other words, if the array has the values 50, 25, 80, 5, and 15, your program should  
return an array, with the values in the descending order: 80, 50, 25, 15, and 5. 

First, create an array of randomly generated integers.  
Print the array before you sort it. And print the array after you sort it. 
You can choose to create a new sorted array, or just sort the current array. 
I showed you how to use the Arrays.sort method,  
but that sorts from lowest to highest. This challenge is for you to sort in reverse,
or descending order.

In addition, you should use the Arrays.toString method,
to print out your array before, and after sorting. 
If you want to, you can make a copy of the array before sorting. 

from java-masterclass.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.