Search:

Type: Posts; User: Aju_21

Search: Search took 0.08 seconds.

  1. Replies
    7
    Views
    2,213

    Re: Begginer Java - Bug in my code?

    oops check this


    for (int i=0; i < sentencelength; i++){
    if (sentence.charAt(i) == ' '){
    if (lettercount >= limit){
    finalcount ++;
    }
    ...
  2. Replies
    7
    Views
    2,213

    Re: Begginer Java - Bug in my code?

    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...
Results 1 to 2 of 2