display letters in ascending order in java
<p>i would like to display letters ether they are in ascending order or not in ascending order, i'm having problem to compare the array's index. in this case i'm using bubble sort technic and modify them.</p>

<pre><code>public class Main
{
    public static void main(String[] args)
    {
        System.out.print( "#Enter text : " );
        String text = BIO.getString();

        while ( ! text.equals( "END" ) )
          {
            boolean inorder = false;
            // Convert the above string to a char array.
            char[] arr = text.toCharArray();

            for (int i=0; i&lt;arr.length-1; i++)
            { //Check pair

               if ( arr[i] &gt; arr[i+1] ) 
                 { 

                    System.out.print("letters in ascending order");
                    inorder = true;

                   }

             }

              if ( ! inorder )
                   { 
                    System.out.print("letters not in ascending order");

                   }

               break;

        }

    }
}
</code></pre>
