package StudentClass;
import java.util.*;
public class StudentRecords{
public static void main(String[] args) {
ArrayList<String/*, String, String*/> StudRecord = new ArrayList<String/*, String, String*/>();
StudRecord.add("Will"/*, "reading", "A"*/);
/*obj.add("Harry");
obj.add("Chaitanya");
obj.add("Steve");
obj.add("Anuj");*/
//System.out.println("Currently the array list has following elements:"+obj);
/*Add element at the given index*/
//obj.add(0, "Rahul");
StudRecord.add("Justin"/*, reading, "B"*/);
/*Remove elements from array list like this*/
//obj.remove("Chaitanya");
// obj.remove("Harry");
System.out.println("Current array list is:"+StudRecord);
/*Remove element from the given index*/
// obj.remove(1);
System.out.println("Current array list is:"+StudRecord);
}
}
Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.
”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.
Our community of experts have been thoroughly vetted for their expertise and industry experience.