a***@gmail.com
2014-10-21 15:40:46 UTC
Hi all.
I'm going back to the drawing board and taking some time to review Java. I'm working through the SAMS Teach Yourself Java in 21 Days and I've hit a bit of a snag. In the chapter that discusses arrays there is a sample with the following code:
Code:
public class HalfDollars {
int[] newYork = {1_900_000, 1_700_000, 1_700_000};
int[] newJersey = new int[newYork.length];
int[] total = new int[newYork.length];
int average;
newJersey[0] = 1_900_000;
newJersey[1] = 1_800_000;
newJersey[2] = 1_750_000;
....
}
However, the IDE generates an error on the last three lines of code with the following message:
"Cannot find symbol class: newJersey"
I'm using Netbeans 8.0; however if I try the same code in Neatbeans 7.3.1 it works without any errors. Can anyone confirm whether there is change in Netbeans that is causing this error? Thanks.
I'm going back to the drawing board and taking some time to review Java. I'm working through the SAMS Teach Yourself Java in 21 Days and I've hit a bit of a snag. In the chapter that discusses arrays there is a sample with the following code:
Code:
public class HalfDollars {
int[] newYork = {1_900_000, 1_700_000, 1_700_000};
int[] newJersey = new int[newYork.length];
int[] total = new int[newYork.length];
int average;
newJersey[0] = 1_900_000;
newJersey[1] = 1_800_000;
newJersey[2] = 1_750_000;
....
}
However, the IDE generates an error on the last three lines of code with the following message:
"Cannot find symbol class: newJersey"
I'm using Netbeans 8.0; however if I try the same code in Neatbeans 7.3.1 it works without any errors. Can anyone confirm whether there is change in Netbeans that is causing this error? Thanks.