aspose file tools
The moose likes Beginning Java and the fly likes Sorting String Array Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "Sorting String Array" Watch "Sorting String Array" New topic
Author

Sorting String Array

Tempora Telora
Ranch Hand

Joined: Jun 20, 2005
Posts: 83
Simple question. Trying to sort a array of strings need to use ignorecase command. When I try and run it keeps stating that it is expecting one type and recieving another.

x[i].comparetoignorecase((string) y[i])

I know its not right but it is close any ideas?
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
a slightly different way

Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24048
    
  13

Java is case-sensitive, so writing "compareToIgnoreCase" as "comparetoignorecase" and "String" as "string" can cause all sorts of interesting error messages. Consult the Java API docs and try to get all the capitalization right, and see if that doesn't improve things.


[Jess in Action][AskingGoodQuestions]
 
I agree. Here's the link: http://jrebel.com/download
 
subject: Sorting String Array
 
Similar Threads
Compare Array with String
convert an array of String to char
How to convert byte array to string array ?
passing java string array to javascript
Convert Java Array to JavaScript Array.