You are on page 1of 1

import java.util.

*;
import java.math.*;
import java.io.*;
class Main {

public static void main(String[] args) {


Stack<Pair> s = new Stack();
s.push(new Pair(1,2));
System.out.println(s.size());
Pair ob = s.pop();
int a = ob.x;
int b = ob.y;
System.out.print(a+" "+b);
}
static class Pair {
int x,y;
Pair(int x , int y){
this.x = x;
this.y = y;
}
}
}

You might also like