Remember that array indexes start at 0. So, for an array with five locations, the indexes would be 0,1,2,3,4. Check that FOR loops and the results of any calculated indexes take this into account. Also, make sure that a value is checked before it is incremented.String[] bob = new String[10]; for(int i=1 ; i<10 ; i++) The index should start at 0, and go to 9 { bob[i]="bob" The error will point to this line }In the first program, the error is caused by the FOR loop having the wrong parameters. This causes the error in another place. |
This video highlights the features available in Health Center. Health Center is a low-processor and memory usage diagnostic tool for monitoring the status of a running IBM Java Virtual Machine (JVM). Health Center provides live information and recommendations in each of the following areas: - Classes: information about classes being loaded - Environment: details of the configuration and system of the monitored application - Garbage Collection: information about the Java heap and pause times - Locking: information about contention on inflated locks - Profiling: sampling profile of Java methods including call paths
Comments
Post a Comment