Search:

Type: Posts; User: Miguel08

Search: Search took 0.09 seconds.

  1. Replies
    3
    Views
    724

    Re: How to save a word in a text file

    yeah I'm searching on the Internet to see if I find anything. What about saving a word that the user inputs to the dictionary file? How can I do this?
  2. Replies
    3
    Views
    724

    How to save a word in a text file

    This part of the code searches for every word in the text file and saves it to an ArrayList. It searches for the word if its valid of not.

    How can I offer a list of similar words when the word...
  3. Replies
    25
    Views
    1,919

    Re: Searching for a word in a text file

    Can I load two files like this?



    package spellChecker.project1;


    import java.io.FileNotFoundException;
    import java.io.FileReader;
    import java.util.HashSet;
  4. Replies
    25
    Views
    1,919

    Re: Searching for a word in a text file

    When you say list do u mean something like this?

    List<String> list = new ArrayList<String>();
  5. Replies
    25
    Views
    1,919

    Re: Searching for a word in a text file

    Yes the code reads the lines from the file. I'm stuck on the second part I don't know how to code and put each word in the list. Can you show me how this is done please? Thank you
  6. Replies
    25
    Views
    1,919

    Re: Searching for a word in a text file

    to be honest I don't know what I'm doing Ive tried everything but nothing seems to be working. I've tried to understand how to read the words and store them in the list but I don't know how to do...
  7. Replies
    25
    Views
    1,919

    Re: Searching for a word in a text file

    How can I read each line into a set<Sting>?
  8. Replies
    25
    Views
    1,919

    Re: Searching for a word in a text file

    The words are stored line by line, the file contains all the words in the dictionary.
  9. Replies
    25
    Views
    1,919

    Re: Searching for a word in a text file

    ok so I read the first file like shown below but how do I separate out the words and save them in a collection ?




    spellChecker.project1;


    import java.io.FileNotFoundException;
    import...
  10. Replies
    25
    Views
    1,919

    Re: Searching for a word in a text file

    I think Ive done this wrong what it suppose to do is ask the user to enter a name of a file and for every word in that file i need to check if the word is contained in the file. :-s
  11. Replies
    25
    Views
    1,919

    Re: Searching for a word in a text file

    How can I do this? sorry if I sound annoying but I'm trying to learn at the same time. If you could show me a small example I think I would understand better.
  12. Replies
    25
    Views
    1,919

    Re: Searching for a word in a text file

    I think this code is easier to read but how can I check if the word is contained in the file?


    package spellChecker.project1;


    import java.io.FileNotFoundException;
    import...
  13. Replies
    25
    Views
    1,919

    Re: Searching for a word in a text file

    No it does not execute I'm still trying to fix that error that you picked up. At what line would i need to test the length of the array using the .length attribute?
  14. Replies
    25
    Views
    1,919

    Re: Searching for a word in a text file

    Thanks for your help. Would the above code work to help me check for a word in a file or offer similar words that the user inputs.
  15. Replies
    25
    Views
    1,919

    Searching for a word in a text file

    Hello guys, I'm creating this small JAVA programme thats checks for a word in the dictionary but when I run it I get an error "Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0...
Results 1 to 15 of 15