Using hardcoded numbers is always bad practice.
The index is past the end of the array. The array has less than 21 elements.
The range of indexes for an array range from 0 to the array length-1....
Type: Posts; User: Norm
Using hardcoded numbers is always bad practice.
The index is past the end of the array. The array has less than 21 elements.
The range of indexes for an array range from 0 to the array length-1....
What array is being indexed? What is the size of the array? What is the value of the index?
The code should use the array's .length attribute to control the for loop. It should NOT use a...
If you are getting error messages, copy the full text and paste it here.
One poor technique I see is hardcoding a for loop control value:
for( int i = 0; i < 21; i ++) {
...
Can you post the values of a,b &c to use?
What are the 3 values that are entered by the user?
For testing, just assign the values directly to a, b and c and comment out the JOptionPane calls.
For example:
a = "123";...