Advertisement
Guest User

Untitled

a guest
Dec 6th, 2019
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. import java.util.*;
  2. import java.io.*;
  3.  
  4. public class sdatugas3 {
  5.  
  6. private static ArrayList<Integer>[] haha;
  7. private static HashMap<String, ArrayList<Integer>> kwkw;
  8.  
  9. public static void main(String[] args) {
  10.  
  11. haha = new ArrayList[5];
  12. ArrayList<Integer> hehe = new ArrayList<>();
  13. for (int i = 0; i < 3; i++) {
  14. hehe.add(i);
  15. }
  16.  
  17. kwkw.put("haha", hehe);
  18.  
  19. haha[0] = hehe;
  20. int counter = 0;
  21. for (ArrayList<Integer> content : haha) {
  22. if (content != null) {
  23. counter++;
  24. }
  25. }
  26.  
  27. System.out.println(counter);
  28. System.out.println(haha[0].size());
  29.  
  30. }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement