Shaddy Krishnan

Greenhorn
+ Follow
since Dec 05, 2009
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Shaddy Krishnan

yeah lol i get it now
8 years ago
Hi can anybody help me? i have this piece of code and i get the error char cannot be dereferenced... im new at this..
this piece of code is in a method..and i have to count the total consonants in a word.. im trying to compare it to a string array of vowels.

for (int outerCounter = (wordLength - 1); outerCounter >= 0; outerCounter --)
{
for (int innerCounter = 1; innerCounter <= MAX; innerCounter ++)
{
if ((word.charAt(outerCounter)).equalsIgnoreCase(vowels[innerCounter]))
{
totalConsonants ++;
}
}
}
return totalConsonants;
8 years ago