whis is the ArrayIndexOutOfbound Exception in java? or define ArrayIndexOutOfbound Exception with exp?
ArrayIndexOutOfbound Exception occurs, when you assign an array which is not compatible with the data type of that array.
Example
public class ArrayoutofboundException { public static void main(String[] args) { try { System.out.println("args[0]="+args[0]); System.out.println("args[1]="+args[1]); System.out.println("args[2]="+args[2]); } catch(Exception ex){ System.out.println(ex); } } }
Ads