Question: Write a method that counts the number of distinct elements in an ArrayList. Do not modify the array list.
Write a method that counts the number of distinct elements in an ArrayList. Do not modify the array list.
Step by Step Solution
3.33 Rating (162 Votes )
There are 3 Steps involved in it
In the Stream interface there exists a method called distinct whic... View full answer
Get step-by-step solutions from verified subject matter experts
