Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- import java.io.*;
- public class sdatugas3 {
- private static ArrayList<Integer>[] haha;
- private static HashMap<String, ArrayList<Integer>> kwkw;
- public static void main(String[] args) {
- haha = new ArrayList[5];
- ArrayList<Integer> hehe = new ArrayList<>();
- for (int i = 0; i < 3; i++) {
- hehe.add(i);
- }
- kwkw.put("haha", hehe);
- haha[0] = hehe;
- int counter = 0;
- for (ArrayList<Integer> content : haha) {
- if (content != null) {
- counter++;
- }
- }
- System.out.println(counter);
- System.out.println(haha[0].size());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement