This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
    Bookmark Topic Watch Topic
  • New Topic

How to check StringArray is sorted or not?

 
Vass Lee
Greenhorn
Posts: 8
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator

Hi All,

I am new guy for JAVA. I want to check my String Array is sorted or not ? how can i achieve this ?.Any one give some sample ?



Here i want to check str is sorted or not ?.Values are stored in alphabetical ascending order or not ?

Thanks,
Vass Lee
 
Weng Keong Chan
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
Sort the input array using Arrays.sort, then compare the resulted array with the input array, if they are the same, the input array is sorted..
 
Vass Lee
Greenhorn
Posts: 8
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator

Hi Weng Keong Chan,

Thakns for your response.

Can you provide any sample ?


Thanks,

Vass Lee
 
John Jai
Rancher
Posts: 1776
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please UseOneThreadPerQuestion
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Pie
Posts: 15150
31
Android IntelliJ IDE Java Scala Spring
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
Let's continue this in your other copy of this question.
 
I agree. Here's the link: http://aspose.com/file-tools
    Bookmark Topic Watch Topic
  • New Topic