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 3 of 3

Thread: file.txt and ReadLine issues

  1. #1
    Junior Member
    Join Date
    Mar 2010
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default file.txt and ReadLine issues

    Hi again! I'm close to being finished with my program, all I need is two more methods to be done.

    1. I have two files associated with my program (One is the commands.txt and the other is results.txt) and my assignment is to make a method that opens these two files in my program... It should be excessively simple, but I'm not sure I understand, do they mean declare BufferedReader and BufferedWriter or...???

    2. I need to make a method that simply reads a line in my commands.txt, which should also be quite simple, but I just want to make sure I'm doing it right.

    3. I'd also like to have an example of how to write in results.txt the result of my program after a command from commands.txt.

    If y'all could help me with some examples, I'd much appreciate it, I've been searching around but I can't quite find the answers I'm looking for...

    Thanks!

    -Chansey
    Last edited by chansey123; March 17th, 2010 at 01:52 PM.


  2. #2
    Super Moderator helloworld922's Avatar
    Join Date
    Jun 2009
    Posts
    2,896
    Thanks
    23
    Thanked 619 Times in 561 Posts
    Blog Entries
    18

    Default Re: file.txt and ReadLine issues

    Post what you have so far and we'll help you. Also, please clarify your questions. What is it you need help with?

  3. #3
    Junior Member
    Join Date
    Jan 2010
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: file.txt and ReadLine issues

    Check this link http://onjava.com/onjava/excerpt/jav...h04/index.html .
    It has examples for BufferedReader and BufferedWriter.
    It will help you.

Similar Threads

  1. Triangle issues
    By FrEaK in forum What's Wrong With My Code?
    Replies: 0
    Last Post: February 24th, 2010, 07:49 AM
  2. Having Issues Past this
    By baGoGoodies111 in forum What's Wrong With My Code?
    Replies: 1
    Last Post: November 12th, 2009, 07:19 PM
  3. (.readLine() method) of BufferedReader class
    By chronoz13 in forum File I/O & Other I/O Streams
    Replies: 7
    Last Post: October 13th, 2009, 06:59 PM
  4. Replies: 0
    Last Post: October 2nd, 2009, 10:51 PM
  5. Problem with sprite rotation in graphics
    By Katotetu in forum Algorithms & Recursion
    Replies: 0
    Last Post: May 8th, 2009, 07:27 PM