I am using Eclipse JUno ,I am having trouble with the .add() of the arraylist guys please help.here is my code
import java.util.ArrayList; public class
Works great with JDK 6
public static void main(String[] args) { ArrayList list=new ArrayList(); list.add(90); list.add(9.9); list.add("abc"); list.add(true); System.out.println(list); }
Printed result :[90, 9.9, abc, true].
If still you are using lesser version than jdk 6.Please specify version.