![Rits rishi](https://www.crazyengineers.com/img/avatar.jpg)
Member • Jul 23, 2013
Java program to insert records using arraylist.
import java.util.*; class employee { emp e1=new emp(); static int limit; static Scanner s1=new Scanner(System.in); ArrayListmy_list=new ArrayList (); public static void main(String[] args) { System.out.println("WELCOME"); System.out.print("Enter the limit="); limit=s1.nextInt(); employee em=new employee(); for(int i=0;i //this program does not print different records as entered according to the limit.it displays only the value last entered. example- if i enter 1st record- riti 1 2900
enter 2nd record-abc 2 1200
then it displays-
abc 2 1200
abc 2 1200
kindly help me.