i figured it out: When you type this
words [g] = swaplow (words [g], words [g + 1]);
words [g + 1] = swaphigh (words [g], words [g + 1]);
you have type this in its...
Type: Posts; User: sbjibo
i figured it out: When you type this
words [g] = swaplow (words [g], words [g + 1]);
words [g + 1] = swaphigh (words [g], words [g + 1]);
you have type this in its...
it still gives exceptions
for (; count < word1.length() ; count++)
{
if (word1.charAt (count) > word2.charAt (count))
{
index = word1;
break;
}...
And to compile, you can use the Scanner method intead of console. But you have to modify the code a bit
It is like a bubble sort. you switch the position of 2 consecutive items in the array. And you loop it for the number of elements the array has. The 'h' variable is to keep track of how many more...
Ya i know. It tells the users to enter the words with the same length
This is a program where the user types a bunch of words and then the program rearranges them into alphabetical order and then prints them.
But this code keeps crashing on line 35 at "for (int count...