Results 1 to 2 of 2
  1. #1
    3MAD is offline Member
    Join Date
    Apr 2011
    Posts
    1
    Rep Power
    0

    Default Input/ output file

    Hi every one

    am new in java , am just try to TEACH myself by books and so on. I faced this problem yesterday .. Can any one tell how i can read file its content like this :

    1 3
    1 4
    8 3
    0 0

    i wanna read each column alone.

    PS || i tried the array .. but i dunno how i have to determine its size .
    Last edited by 3MAD; 04-15-2011 at 11:13 AM.

  2. #2
    j2me64's Avatar
    j2me64 is offline Senior Member
    Join Date
    Sep 2009
    Location
    Zurich, Switzerland
    Posts
    962
    Rep Power
    11

    Default

    Quote Originally Posted by 3MAD View Post
    Hi every one

    am new in java , am just try to TEACH myself by books and so on. I faced this problem yesterday .. Can any one tell how i can read file its content like this :

    1 3
    1 4
    8 3
    0 0

    i wanna read each column alone.

    PS || i tried the array .. but i dunno how i have to determine its size .

    suppose you read the file with the content above line by line. when a line is readed you could use the method split(" ") to split the numbers with this example

    String numbers[] = line.split(" ");

    and use an arraylist instead of array. try and post your code that make troubles ....

Similar Threads

  1. Need help with input/output program error
    By stefan2892 in forum New To Java
    Replies: 2
    Last Post: 02-07-2011, 07:57 PM
  2. File input output
    By edcaru in forum New To Java
    Replies: 5
    Last Post: 12-19-2010, 05:52 PM
  3. Replies: 8
    Last Post: 05-12-2010, 07:19 PM
  4. help with data output, input
    By collin389 in forum New To Java
    Replies: 3
    Last Post: 11-11-2009, 05:34 PM
  5. Single XSD Creation for input/output
    By lavanya82 in forum XML
    Replies: 0
    Last Post: 03-13-2009, 12:02 PM

Posting Permissions

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