oops check this
for (int i=0; i < sentencelength; i++){
if (sentence.charAt(i) == ' '){
if (lettercount >= limit){
finalcount ++;
}
...
Type: Posts; User: Aju_21
oops check this
for (int i=0; i < sentencelength; i++){
if (sentence.charAt(i) == ' '){
if (lettercount >= limit){
finalcount ++;
}
...
The problem with ur code is it uses " " (space) to increment the finalcount . There is no space after last word, so it doesn;t gets count. Try appending a space to the string after u take as input or...
error in this line
document.writeIn( "<h1>The sum is " + sum + "</h1>");
it is writeln i.e "L" and not "I"
writeln means "write line"
make the change,and it will work perfectly.
It is because you have written the following case out of switch { }
case "load":
load(passwords);
instead of ending switch i.e. } after save(passwords);
end } after load(passwords);
i guess...