public void addEventTime(String eTimesIn)
{
if (numETimes == eTimes.length) {
increaseEventTimesCapacity();
}
eTimes[eTimes.length - 1] = eTimesIn;
}
Asked
Active
Viewed 108 times
-2

Tui Popenoe
- 2,098
- 2
- 23
- 44

bree
- 1
- 1
-
1possible duplicate of [What is a Null Pointer Exception, and how do I fix it?](http://stackoverflow.com/questions/218384/what-is-a-null-pointer-exception-and-how-do-i-fix-it) – Azat Mar 18 '15 at 16:02
1 Answers
0
Straight from the Docs:
Thrown when an application attempts to use null in a case where an object is required. These include:
Calling the instance method of a null object.
Accessing or modifying the field of a null object.
Taking the length of null as if it were an array.
Accessing or modifying the slots of null as if it were an array.
Throwing null as if it were a Throwable value.
I would guess your eTimes[eTimes.length - 1] = eTimesIn;
is trying to access a null.

Community
- 1
- 1

Tui Popenoe
- 2,098
- 2
- 23
- 44