System.out.println(list.size()); Will display java code example
Example: print list in java
for(int i=0;i<list.size();i++){
System.out.println(list.get(i));
}
for(int i=0;i<list.size();i++){
System.out.println(list.get(i));
}