Online Java Compiler By
JavaTpoint.com
import java.util.LinkedList; import java.util.List; public class JavaListSizeExample3 { public static void main(String[] args) { List
list= new LinkedList<>(); for (char ch='a';ch<='z';ch++){ list.add(ch); } System.out.println("Total alphabets : "+list.size()); System.out.println("List : "+list); } }
Output