1523 Views
By using the get() method we can access an element in the ArrayList, which is assigned to the index number:
import java.util.ArrayList;
public class Main {
public static void main(String[] args) {
ArrayList<String> mobiles = new ArrayList<String>();
mobiles.add("Samsung");
...
Anamika Gupta
Dec 14, 2021