int[] arr = new int[5]; System.out.println(arr.length); // 5 String str = "test"; System.out.println(str.length());//4 ArrayList<Integer> arrList = new ArrayList<>(); System.out.println(arrList.size());//0