Bryan Peach wrote:ok forget about the tyoe casting i got that figureed out... but now when i go to compile i get a null pointer exception in the main method somewhere... does anyone know how to remedy that?
Please enter the number of occupants in apartment #1
1
2
3
4
5
6
7
8
9
Please enter the number of occupants in apartment # 1
The total number of people in the building is: 45
The Average number of people in each apartment is: 4
The number of apartments with above average occupants is: 35
The number of apartments with below average occupants is: 10
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 10
at Apartment.getAboveAverage(Apartment.java:51)
at Apartment.main(Apartment.java:78)
I love this place!
Please enter the number of occupants in apartment #1
1
Please enter the number of occupants in apartment #0
2
Please enter the number of occupants in apartment #2
3
Please enter the number of occupants in apartment #4
4
Please enter the number of occupants in apartment #6
5