Results 1 to 2 of 2

Thread: Beginners question: Textfiles

  1. #1

    Thread Starter
    Hyperactive Member Petergotchi's Avatar
    Join Date
    Jan 2002
    Location
    Dendermonde - Belgium
    Posts
    267

    Post Beginners question: Textfiles

    Hi... I'm trying to learn Java on my own... But I got one question I got stuck on... :-(
    I've got an application that uses a stringTokenizer to split a string like ("Test1, Test2, Test3") into seperate pieces...
    But now I want to be able to read this info from a textfile...
    And I don't know how...
    I have a textfile like this:
    Test1,Test2,Test3
    Test4,Test5,Test6
    So I need a method that returns a string... That method has only one parameter and that's the linenumber...
    For example: ReadLine(0) would return "Test1,Test2,Test3"
    Anyone got code how to do this???
    Sorry for the (probably) stupid question...

    Thx a lot...

    Pieter

    Ps: I'm talking about an application, not an applet

  2. #2

    Thread Starter
    Hyperactive Member Petergotchi's Avatar
    Join Date
    Jan 2002
    Location
    Dendermonde - Belgium
    Posts
    267

    Talking Whoo-hoo

    Nevermind...
    After a night looking for the answer, I found it myself... ;-)
    Thx anyway

    Pieter

Posting Permissions

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



Click Here to Expand Forum to Full Width