size list java
Before operation: [1, 2, 3, 4, 5]
Size of list = 5
size list java
Before operation: [1, 2, 3, 4, 5]
Size of list = 5
how to get a list length in java
import java.util.ArrayList;
import java.util.List;
public class Demo {
public static void main(String[] args) {
List aList = new ArrayList();
aList.add("Apple");
aList.add("Mango");
aList.add("Guava");
aList.add("Orange");
aList.add("Peach");
System.out.println("The size of the ArrayList is: " + aList.size());
}
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us