I have an Arraylist. If user enter the same number secondly I want to show to user. For this I need to find Arraylist have it or not.
Arraylist
I hop
No, you have not. But here's my best guess:
List values = Arrays.asList( 1, 2, 4, -5, 44 ); int userValue = 44; if (!values.contains(userValue)) { values.add(userValue); }