Results 1 to 3 of 3

Thread: File io

  1. #1
    loopsnhoops is offline Member
    Join Date
    Feb 2011
    Posts
    83
    Rep Power
    0

    Default File io

    I need to write strings and ints to a txt file but I need to connect them as pairs so when I access the name of one I get its int value. Also I need to be able to read this. Suggestions?

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,559
    Rep Power
    25

    Default

    when I access the name of one I get its int value
    That sounds like the way a Map works. Use the key(name) to get a value.
    Look at the Properties class.

  3. #3
    goldest's Avatar
    goldest is offline Senior Member
    Join Date
    Oct 2009
    Location
    Pune, India
    Posts
    469
    Rep Power
    5

    Cool

    Quote Originally Posted by loopsnhoops View Post
    I need to write strings and ints to a txt file but I need to connect them as pairs so when I access the name of one I get its int value. Also I need to be able to read this. Suggestions?
    Go through the API documentation details for Map and File I/O.

    Goldest
    Java Is A Funny Language... Really!
    Click on * and add to member reputation, if you find their advices/solutions effective.

Similar Threads

  1. Replies: 6
    Last Post: 12-01-2010, 05:31 AM
  2. Replies: 1
    Last Post: 08-04-2010, 03:24 PM
  3. Replies: 0
    Last Post: 07-15-2010, 01:23 PM
  4. Replies: 0
    Last Post: 02-11-2009, 09:53 AM
  5. Replies: 7
    Last Post: 05-23-2008, 03:46 AM

Posting Permissions

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