System.out.println() - the poor man's debugger - to the rescue again...
Have a look at what your loop is doing:
System.out.println("About to start loop");
for(int i = n; i == 0; i--)
{
...
Type: Posts; User: pbrockway2
System.out.println() - the poor man's debugger - to the rescue again...
Have a look at what your loop is doing:
System.out.println("About to start loop");
for(int i = n; i == 0; i--)
{
...
OK. So reverseArray is null - that is it has not been assigned a value yet. And you cannot call a method like toString() on something that doesn't exist.
You can test this claim (that...
Which is line 27 of Purse.java? The runtime exception is saying that you are using a variable here that is null.