Funny, when I used Scanner, it compiled. No exceptions.
However, it is printing blanks for all the values in array. I think that might be due to index being null when characters happen to be the...
Type: Posts; User: javapenguin
Funny, when I used Scanner, it compiled. No exceptions.
However, it is printing blanks for all the values in array. I think that might be due to index being null when characters happen to be the...
May I ask what the h variable is for. It's not doing anything. Or at least you never use it.
Also, in the h loop you're going from 0 to slots and in the other one, the inner one, you're going...
Not sure, but your code is assuming that word2 has at least as many characters as word1.
If it encounters say
word1 = "mongoose" word2="snake" then you've got a problem.