Follow Us
  • Register
Errorbase is a collaborative writing project, that aims to build the largest trouble-shooting guide about all kinds of error messages.


0 votes
needs a solution for this:


Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: -24
requested by

1 Solution

0 votes


public class Q1
public static void main(String[] args)
int [] arr = new int[5];
  int a=Integer.parseInt(args[0]); 
int b=Integer.parseInt(args[1]);
int c=Integer.parseInt(args[2]);
int d=Integer.parseInt(args[3]);
int e=Integer.parseInt(args[4]); 
int f=Integer.parseInt(args[5]);   
catch(ArrayIndexOutOfBoundsException e)
System.out.println("Masukkan 5 Nombor sahaja!!");  
System.out.println("THANK yOU");
solved by