ArrayList without generics
import java.util.*; public class Main { public static void main(String[] args) throws Exception { ArrayList a = new ArrayList(); a.add(1); a.add("j"); a.add('j'); System.out.println(a.get(0) instanceof Integer); System.out.println(a.get(1) instanceof String); System.out.println(a.get(2) instanceof Character); } } Output: true true true How ArrayList works internally ? https://www.youtube.com/watch?v=jSlmXcE7g7A