jwrbg

ListEquals

Feb 20th, 2020
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. package com.company;
  2.  
  3. import java.util.ArrayList;
  4. import java.util.Arrays;
  5. import java.util.List;
  6.  
  7. public class ListEquals
  8. {
  9. public static void main(String[] args)
  10. {
  11. List<Integer> listOne = new ArrayList<>(Arrays.asList(1, 2, 3, 4, 5));
  12. List<Integer> listTwo = new ArrayList<>(Arrays.asList(1, 2, 3, 5,4));
  13.  
  14. System.out.println(listOne.equals(listTwo));
  15.  
  16.  
  17. }
  18. }
Add Comment
Please, Sign In to add comment