Welcome to the Java Programming Forums
The professional, friendly Java community. 21,500 members and growing!
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.