I'm having difficulty in formulating the code in this problem:Use the string-comparison methods discussed and the techniques
for sorting arrays developed to write an application that alphabetizes
a list of strings. Allow the user to enter the strings in a text field. Display the results in a text area.

I badly need help.

Recommended Answers

All 2 Replies

Hi enitsirc and welcome to DaniWeb,

What are the "string comparison methods discussed" in your class? And the techniques for sorting arrays too...

Your question is a little confusing but from what I have gathered here's what you need to do:
Take several strings from a user sort them alphabetically and show them, in a text area, in sorted order.

If yes, you can use the compareTo() method of the String class for this. It compares two strings lexicographically.

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.