Friday 8 August 2014

Array Index out of bound Exception


import java.util.ArrayList;
public class Jnext_Demo {

public static void main(String[] args) {


ArrayList data= new ArrayList();
//now ADD data in array list  2 string insert  in array list
data.add("java");  // 0 index
data.add("android"); // 1 index


// now Display data  with  index 3

System.out.println(data.get(3));


}
}
Check screen short for java class.


Output Screen 


IF you have more Query ,Write comment blow  

No comments:

Post a Comment