Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.AbstractMap.SimpleEntry;
- import java.util.ArrayDeque;
- import java.util.Deque;
- public class Dimension2 {
- public static void main(String[] args) {
- int[][] a = {{1, 2}, {3, 4}, {5, 6}};
- Deque<SimpleEntry<Integer, Integer>> as =
- new ArrayDeque<SimpleEntry<Integer, Integer>>();
- for (int i = 0; i < a.length; i++) {
- as.offer(new SimpleEntry<Integer, Integer>(a[i][0], a[i][1]));
- }
- System.out.println(as);
- as.pollLast();
- System.out.println(as);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement