Search:

Type: Posts; User: jps

Search: Search took 0.11 seconds.

  1. Replies
    36
    Views
    3,884

    Re: Trouble Updating an Array

    You really need to consider important factors then.
    How many times will you need to access the data?
    How often will you need to access the data?
    Will you need the data in a specific order, and if...
  2. Replies
    36
    Views
    3,884

    Re: Trouble Updating an Array

    Well there are many possible ways to store/access/manipulate data. I would say think about what kind of access you need, what kind of sorted/unsorted order you need to store them in, and spend some...
  3. Replies
    36
    Views
    3,884

    Re: Trouble Updating an Array

    no idea what that is ...
    certianly the way I would approach it



    So given your text file example:...instead of loading the entire file into one ArrayList, you could have a multi-dimensional...
  4. Replies
    36
    Views
    3,884

    Re: Trouble Updating an Array

    What I meant in my previous suggestion on the combined methods is a little different. Maybe you should read that link again. But basically:

    Note your open methods. Both of them. They both init a...
  5. Replies
    36
    Views
    3,884

    Re: Trouble Updating an Array

    One more thing my lost post had:
    When you get nothing to show, but the code compiles and seems to run, it is time to use the ol debugger, or some println(my_variables) and see what is where.
  6. Replies
    36
    Views
    3,884

    Re: Trouble Updating an Array

    Somehow my last post did not go through and all was lost. There are many other things in your code to go over, but time runs short for me today. So for now a quick list:
    There is repeated code...
  7. Replies
    36
    Views
    3,884

    Re: Trouble Updating an Array

    //
    import java.awt.*;
    import java.io.*;
    import java.util.*;
    import java.lang.*;
    import javax.swing.ImageIcon;

    public class Level {

    private Scanner l;
  8. Replies
    36
    Views
    3,884

    Re: Trouble Updating an Array

    Yes you never did say Array with the characters 'a', 'r', and 'y'. It was implied by [].
    Array class
    ArrayList class
    I am sure you can find them easy enough, but there they are. There are many...
  9. Replies
    36
    Views
    3,884

    Re: Trouble Updating an Array

    Just for clarity on this point, you are replacing your instances of Array with ArrayList, not replacing all instances of String...
  10. Replies
    36
    Views
    3,884

    Re: Trouble Updating an Array

    Well the ArrayList class will be implemented much in the same way as you did the Array. It would be an ArrayList of type String. But you also need to keep in mind not to declare it twice. It is the...
  11. Replies
    36
    Views
    3,884

    Re: Trouble Updating an Array

    The difference in what you normally do and what you are currently doing is the type.
    int is a primitive type, and your variable Level1[] is a String array. When you have String Level1[] = new...
  12. Replies
    36
    Views
    3,884

    Re: Trouble Updating an Array

    exactly my point.
    You have this variable initialized when declared.
    Then you initialize a DIFFERENT variable of the same name.
    Later when you try to use one of the two, the compiler takes the one...
  13. Replies
    36
    Views
    3,884

    Re: Trouble Updating an Array

    I threw your code in my IDE and the only complaint was your variable you say has the error is not used. Miss something somewhere?
  14. Replies
    36
    Views
    3,884

    Re: Trouble Updating an Array

    But of course. Lets start with a fresh post of your current code
  15. Replies
    36
    Views
    3,884

    Re: Trouble Updating an Array

    Give it a shot and let me know how it works out.
  16. Replies
    36
    Views
    3,884

    Re: Trouble Updating an Array

    I looked over your (ahem) smaller sample... and it does not contain the same error you mentioned in your original post. :-/ So I took a gaze at your first setup and I see you declared a private...
  17. Replies
    36
    Views
    3,884

    Re: Trouble Updating an Array

    Just a quick note as I am looking over your code:
    public Main() {

    openHeader();
    readHeader();
    ...and then:

    public void openHeader() {

    try {
  18. Replies
    36
    Views
    3,884

    Re: Trouble Updating an Array

    Love too help ya.
    But my lazy side has kicked in.
    Perhaps a smaller sample to work with?
Results 1 to 18 of 18