Search:

Type: Posts; User: Usoda

Search: Search took 0.11 seconds.

  1. Replies
    20
    Views
    3,154

    [SOLVED] Re: Nested Loops & Processing Strings

    Alright I finished my program however, I need a counter for words. The program below counts words that end with a space.

    I need to do an || statement or a different loop to count words that also...
  2. Replies
    20
    Views
    3,154

    [SOLVED] Re: Nested Loops & Processing Strings

    I didn't know you had to assign it. I thought char currentChar; would be all you had to do to initialize it. I guess I was wrong though.
  3. Replies
    20
    Views
    3,154

    [SOLVED] Re: Nested Loops & Processing Strings

    Hey man I feel yeah. I got another error:

    The local variable currentChar may not have been initialized

    I am going to take a break because I am becoming frustrated, and can't stand to stare at...
  4. Replies
    20
    Views
    3,154

    [SOLVED] Re: Nested Loops & Processing Strings

    Sorry to be so bothersome, but now it is saying:

    The method isWhitespace(char) in the type java.lang.Character is not applicable for the arguments ()

    I don't understand why it is trying to...
  5. Replies
    20
    Views
    3,154

    [SOLVED] Re: Nested Loops & Processing Strings

    Tjstretch with your method I get an error "Cannot invoke isDigit on the primitive type char?" on both isDigit and isWhitespace
  6. Replies
    20
    Views
    3,154

    [SOLVED] Re: Nested Loops & Processing Strings

    Tjstretch I have not read your post yet. I just now created this which counts everything, but it doesn't combine the values.

    while (input.hasNextLine()) {

    last = input.nextLine();
    ...
  7. Replies
    20
    Views
    3,154

    [SOLVED] Re: Nested Loops & Processing Strings

    I am still unsure how to increment a counter to tell me how many characters, digits, and blank spaces. Also, is there a way to do this with methods from class Character?
  8. Replies
    20
    Views
    3,154

    [SOLVED] Nested Loops & Processing Strings

    I am reading a file from the user and now I have to count the number of characters, blank spaces, digits, "other characters", words, and lines in a text file using a loop.

    I am having trouble...
Results 1 to 8 of 8