logo

Crowdly

Browser

Add to Chrome

Quelle est la sortie de ce programme (Pile générique)? import java.util.Sta...

✅ 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());

}

}

More questions like this

Want instant access to all verified answers on moodle.myefrei.fr?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome