Question:

Do You Know The code in java that sorts characters...?

by Guest63288  |  earlier

0 LIKES UnLike

The problem is i need to sort names not using compareto and sort functions... our professor told that we must put the names in arrays of characters and sort it... but i dont know how to sort characters.. Can I use < and > in Sorting characters??

 Tags:

   Report

1 ANSWERS


  1. Yes, you can use &lt; and &gt; to sort chars. Note that they will sort according to their rank in UNICODE, so watch for anomolies like a &gt; B and such. One common trick when sorting strings char by char is to promote the chars to uppercase, then sort.

Question Stats

Latest activity: earlier.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.