Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 
avatar of Sanchit

Sanchit

Sanchit has asked 3 questions and find answers to 0 problems.

Stats

15
EtPoint
0
Vote count
3
questions
0
answers

About

This program is to sort the word "computerProgram" in alphabetical order

public class SortWord{
    public static void main (String args{})
    {
        String s = "computerProgram";
        for (int i = 0; i < Interger.Max_Value; i++)
        {
            s = randomSort(s);
            if (s.eqlaus("pPrrmmaautooceg"))
            {
                System.out.println(s);
                break;
            }
            if (i == Interger.Max_Value - 1)
            {
                i = 0;
            }
        }
    }