✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
Quelle est la sortie de ce programme (Pile générique)?import java.util.Stack;
class PileGeneric <E>
{
Stack <E> pile = new Stack <E>();
public E pop()
{
E obj = pile.pop();
return obj;
}
public void push(E obj)
{
pile.push(obj);
}
}
public class Test
{
public static void main(String args[])
{
PileGeneric <Integer> pg = new PileGeneric <>();
pg.push(44);
System.out.println(pg.pop());
}
}