Confusion with finishing add method through a different class
posted 2 years ago
I keep getting an indexoutofbounds and cant figure out how to set up addmethod and PrintData method that so that i can pull info from a different class. This is part of the class where the info is being pulled from.
Please have a careful look at the stack trace - the error message that you get on the console. It tells you exactly in which line the exception occurs, where the method where it happened was being called from etc.
Also, please post the stack trace here, because it contains a lot of information to diagnose the problem.
The code you posted does not look like it could produce this exception, so from what you posted we can't tell what's wrong.