1. To find a value if it exits in an arraylist
Ans : - Just use ArrayList.contains(desiredElement).
Ans : - Just use ArrayList.contains(desiredElement).
if (lista.contains(conta1)) {
System.out.println("Account found");
} else {
System.out.println("Account not found");
}
No comments:
Post a Comment