Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 6 of 6

Thread: How to read in a file?

  1. #1
    Junior Member
    Join Date
    Apr 2013
    Posts
    17
    My Mood
    Confused
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How to read in a file?

    Hi,

    I was just wondering, how do I read a .txt file into my program even though i do not know the name of the file? Thanks


  2. #2
    Junior Member
    Join Date
    Apr 2013
    Posts
    17
    My Mood
    Confused
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How to read words in a file?

    Hi, How do I read one word at a time in a .txt file? Thanks

  3. #3
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,372
    Thanks
    184
    Thanked 836 Times in 779 Posts
    Blog Entries
    5

    Default Re: How to read words in a file?


  4. #4
    Member
    Join Date
    Apr 2012
    Posts
    163
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Default Re: How to read in a file?

    How are you to determine what/where the file is? You can't read in a file without a path.

  5. #5
    Super Moderator jps's Avatar
    Join Date
    Jul 2012
    Posts
    2,642
    My Mood
    Daring
    Thanks
    90
    Thanked 263 Times in 232 Posts

    Default Re: How to read in a file?

    Please keep your topic within one thread.
    Threads merged.

    This forum is not a code service. Help yourself to all the help we provide, but no one is doing your assignment for you.
    Respond to post #3 if you still have problems

  6. #6
    Member llowe29's Avatar
    Join Date
    Jul 2013
    Posts
    118
    My Mood
    Tired
    Thanks
    9
    Thanked 6 Times in 6 Posts

    Default Re: How to read in a file?

    no code = no help

Similar Threads

  1. Read input, read file, find match, and output... URGENT HELP!
    By MooseHead in forum What's Wrong With My Code?
    Replies: 3
    Last Post: April 3rd, 2012, 12:01 PM
  2. [SOLVED] Jar file to read text file from within itself
    By KILL3RTACO in forum Java Theory & Questions
    Replies: 2
    Last Post: October 24th, 2011, 07:34 PM
  3. [SOLVED] Can I have two scanners to the same file? (I want to read through one file 2 times)
    By beginnerprogrammer in forum File I/O & Other I/O Streams
    Replies: 2
    Last Post: October 20th, 2011, 12:23 PM
  4. Java I/O File code; how to read/write file
    By ryu2le in forum File I/O & Other I/O Streams
    Replies: 1
    Last Post: September 18th, 2011, 06:51 PM
  5. Read a text file and parse the contents of file
    By HelloAll in forum File I/O & Other I/O Streams
    Replies: 1
    Last Post: March 3rd, 2011, 05:47 AM

Tags for this Thread