Results 1 to 4 of 4
  1. #1
    cvcs1 is offline Member
    Join Date
    Jan 2010
    Posts
    2
    Rep Power
    0

    Default Reading .txt files

    Hi I am designing an English Spanish Dictionary using Java. I need to be able to read a .txt file and be able to have access to words in it. How can I scan the file? Where do I put it and is it possible to read to separate strings on one line in a .txt file?

  2. #2
    cvcs1 is offline Member
    Join Date
    Jan 2010
    Posts
    2
    Rep Power
    0

    Default

    Please reply thoroughly for I am very rusty in Java.

  3. #3
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    10

    Default

    Read the javadocs for the FileReader and BufferedReader classes and try some code.
    You can split strings using the String.split method.

  4. #4
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,370
    Blog Entries
    1
    Rep Power
    22

    Default

    Or at least search our forum as well as Google. You can find lost of examples related to yours. Then give a try on yours and let us know if you are stuck on with any.

Similar Threads

  1. Reading files and splitting them
    By Dieter in forum Advanced Java
    Replies: 5
    Last Post: 09-30-2009, 09:46 AM
  2. reading Excel Files
    By wdb07159 in forum New To Java
    Replies: 2
    Last Post: 05-06-2009, 12:45 PM
  3. reading files and arraylists
    By infinity in forum Advanced Java
    Replies: 2
    Last Post: 01-09-2009, 05:31 AM
  4. Reading growing files
    By ionna22 in forum Advanced Java
    Replies: 0
    Last Post: 10-20-2008, 04:43 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •