Results 1 to 3 of 3

Thread: Read a 2d array

  1. #1
    YOGESH.BALODI is offline Member
    Join Date
    May 2013
    Posts
    2
    Rep Power
    0

    Default Read a 2d array

    hi all ,


    I have a 2d array in a java file to be read and stored in it from another java file , please help how to read it.


    The array is as follows :


    1, 1, 1
    1, 2, 2
    1, 4, 3

    where


    index[1] is LINE_NO ,index[2] is FILE_NO,index[3] is id.

    PLEASE HELP

  2. #2
    monkeyjr97 is offline Senior Member
    Join Date
    Nov 2012
    Posts
    258
    Rep Power
    2

    Default Re: Read a 2d array

    when you say index [1] in line number do you mean index [0][1]? so file no is [0][2] id is [0][3]

    Or: is line number [0][0], file no [1][0]. id [2][0]

    This is important so we known what format you want to read in it. [0][0] is the top left corner, arrays start their index at 0, not 1 just in case you didn't know.


    But to read it you could use a file input stream and it's methods.

  3. #3
    YOGESH.BALODI is offline Member
    Join Date
    May 2013
    Posts
    2
    Rep Power
    0

    Default Re: Read a 2d array

    yes right index [0] is line number and [1] is file no and [2] is id . Sorry for mistake

Similar Threads

  1. how to read array index
    By aconti in forum New To Java
    Replies: 5
    Last Post: 08-12-2011, 10:52 PM
  2. read a csv file in an array list
    By dellacpa in forum New To Java
    Replies: 21
    Last Post: 06-24-2011, 08:52 PM
  3. JTextField Array Read Error
    By relax1 in forum New To Java
    Replies: 6
    Last Post: 12-17-2010, 10:30 PM
  4. Help ! Read from txt to array an than search
    By kram54 in forum New To Java
    Replies: 1
    Last Post: 12-09-2010, 12:52 AM
  5. Read File into 2d array
    By almjodla in forum New To Java
    Replies: 8
    Last Post: 03-23-2010, 03:55 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
  •