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...
Type: Posts; User: jps
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...
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...
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...
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...
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.
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...
//
import java.awt.*;
import java.io.*;
import java.util.*;
import java.lang.*;
import javax.swing.ImageIcon;
public class Level {
private Scanner l;
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...
Just for clarity on this point, you are replacing your instances of Array with ArrayList, not replacing all instances of String...
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...
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...
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...
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?
But of course. Lets start with a fresh post of your current code
Give it a shot and let me know how it works out.
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...
Just a quick note as I am looking over your code:
public Main() {
openHeader();
readHeader();
...and then:
public void openHeader() {
try {
Love too help ya.
But my lazy side has kicked in.
Perhaps a smaller sample to work with?