I am confused about the String arrays parameter in each method. What is the point of the outer (or inner) array? Remember that in Java, a String is a built in type, not like C where it is an array of characters.
A very very brief web search (using Google: bubble sort in java) found some very professional looking code. You should probably look the same way, and understand what that code is doing before you write your own. If you just copy someone's code, it is plagiarism, which is wrong. If you look at two or three and then write your own with the knowledge you gained, it is research which is right and good (and to be honest, you must mention what you did, and the places you looked: Give credit to the people who made your life easier).
Bear in mind that one thing you are learning as a student is how to do research. As a programmer, I spend a lot of time looking for answers that other people have already found. I just spent about an hour this morning on such a search, for example. I found the answer too! I love the internet!
As to your question: On lines 7 and 43 you make reference to a variable i that has never been declared. I'm reasonably sure that the compiler has issued an error about that (or something else that it found first). Next time you ask a question, please be a little more specific. "It does not work" is a large universe of possible problems. "The compiler said 'some actual error message' but I don't understand what to do about it" is a much better question.
Your professor is not mine, of course, but I once was given an open exam that included a question something like: "Find and prove a closed form approximation for calculating large Fibonacci numbers" (or maybe it gave the formula and told us to prove it?). My office mate had just recently published a paper (with that professor) doing just that, and I knew of it from talking to him. I got full credit on that question for just making a reference to the published paper. When the tests were handed back, the prof pointed out that my answer was not only the briefest, but also the best.
User types: apple Apple Zone apple done You display: As entered 0:a:apple 1:a:Apple 2:z:Zone 3:a:apple Bubble Sorted 0:a:apple 1:a:Apple 3:a:apple 2:z:Zone Selection Sorted 1:a:Apple 0:a:apple 3:a:apple 2:z:Zone
Get the source for the String compareTo method and study that. It comes with the JDK.
Here's two ideas: 1)Create an array of 256(or 128) elements and fill it with the values representing the order of the index to the array. For example array would have the value of the letter 'a'. Use those values to compare the chars in two strings. 2)Create a String with the chars in the order you want to sort. Use the indexOf() value as the sorting value for the letter. For example: str.indexOf('a') would be the value for 'a'
Holy Moly! @NormR1 is suggesting a lot of work. Much easier: In your code replace this method name: "compareTo" with the method named "compareToIgnoreCase". I believe that will solve your immediate need.
"Case sensitive" means "pays attention to case" which for ASCII characters means that 'A' < 'Z' < 'a' < 'z'. We talk about "ignore case" or "fold case" to mean something equivalent to replacing all the letters with their upper (or lower) case equivalent before doing the comparison. In an 'ignore case' situation, 'A' compares equal to 'a', 'Z' compares equal to 'z' and the usual alphabetical order is used for these 'folded case/ignore case' characters.