Comments (1)
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)
- OOP Exercise 38 composition
- OOP Ex 39 Encapsulation
- OOP Ex 40 Polymorphism
- Manage access to different k8s cluster
- OOP Ex 41 Bills Burger
- Section 9 ex 43 Minimum Element Challenge
- Section 9 ex 44 Reverse Array Challenge
- Section 10 Exercise 45 ArrayList Challenge
- Section 10 Exercise 46 LinkedList
- Section 10 Exercise 48 AutoUnboxing
- Update Readme
- Section 11 Abstract Class Challenge
- Section 11 Interface Challenge
- Section 12 Generics Challenge
- Section 14 Java Collections Exercise 42 Adventure Game
- Section 14 Java Collections Exercise 43 Immutable Class
- Section 14 Java Collections Exercise 44 Sets
- take a look at https://k9scli.io/
- take a look at https://starship.rs/
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from java-masterclass.