Results 1 to 2 of 2
  1. #1
    fernando is offline Member
    Join Date
    Jul 2007
    Posts
    40
    Rep Power
    0

    Default Help with array and files in java

    Hi, How would i get to do a two dimensional array to work and be defined in at least one line. Much like normal arrays such as
    Java Code:
    String[] zero={"Hi"};
    but i want it to be String[][] and so forth. Also i need help with understanding how to read and write files along with creating to.
    I want to make a saved file for a game and the data is stored in like a .txt each variable on a certain line and such.

    Thanks.

  2. #2
    brianhks is offline Senior Member
    Join Date
    Jul 2007
    Posts
    135
    Rep Power
    0

    Default

    This page has some examples of two dimensional arrays

    As for saving stuff to files I would use java.util.Properties. They act like a map but you can save them to file and load them up.

Similar Threads

  1. How to play video files in Java
    By Hasan in forum Advanced Java
    Replies: 11
    Last Post: 04-27-2009, 12:57 AM
  2. Batch Files in java
    By coco in forum New To Java
    Replies: 3
    Last Post: 12-05-2008, 02:30 PM
  3. JAR file with .java files
    By ravian in forum New To Java
    Replies: 7
    Last Post: 12-24-2007, 09:15 PM
  4. error in Java files
    By ai_2007 in forum Advanced Java
    Replies: 1
    Last Post: 07-31-2007, 01:14 PM
  5. How to search files with Java
    By karma in forum New To Java
    Replies: 1
    Last Post: 05-26-2007, 02:25 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
  •