hi,i inserted "lastadded" choice at 1000 position,
when i access getItem(555) it compiles,but gives me arrayoutofboundsException....
1. if i insert item at 1000 position, is it not that i have total 1000 of them and others are blank?
import java.awt.*;
class mychoice extends Frame{
public static void main (
String args[])
{
new mychoice();
}
mychoice()
{
Choice c1 = new Choice();
c1.add("First");
c1.addItem("Second");
c1.add("Third");
c1.insert("Lastadded",1000);
System.out.println(c1.getItemCount());
System.out.println(c1.getItem(555));
}
}