Welcome to the Java Programming Forums
The professional, friendly Java community. 21,500 members and growing!
The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.
Members have full access to the forums. Advertisements are removed for registered users.
Last edited by Sir Saula; July 10th, 2010 at 09:09 PM.
The output you show is sorted with case sensitivity. 'Z' comes before 'a'
Show what you think the order should be.
Please post links to other forums this is posted on.
I think that was just how the format to be but i am not certain...is there a code that can generate that output
How to create a bubble sort and selection sort - Java
Please only post on one site.
See answers on the other forum.
Uppercase letters by default will always get sorted ahead of lower case letters (when considering case) because their underlying representation in Unicode puts upper case letters before lower case letters.
If you want to sort the string such that B comes before b but B comes after a, you will need to implement the comparison method yourself.