-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
The error "Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 3" occurs because the program is trying to access an element of an array that does not exist. Specifically, the error occurs in the line "graphics2D.drawLine(nodeCoords[node1].x, nodeCoords[node1].y, nodeCoords[node2].x, nodeCoords[node2].y);" when the value of the variable "i" is equal to "numNodes - 1", causing the variable "node2" to be equal to "shortestRoute[numNodes - 1]" which is an invalid index.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels