plss give me some basic example of sorting with user input!!!! thx

Recommended Answers

All 2 Replies

Assuming that you want to sort an array of numbers then declare your array, read from the input then numbers and store each one of them in the array and then call a method that sorts the array:
For reading I use this:

BufferedReader USERIN = new BufferedReader (new InputStreamReader(System.in));
USERIN.readLine();

If you search this forum you will find other ways to read from the input.

plss give me some basic example of sorting with user input!!!! thx

Sorry, we are here to help with code that people are having trouble with - not provide example code on demand. Post your efforts and specific questions about the trouble you are having. If you haven't made any effort yourself, you're out of luck.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.