generate functionSun, 18 Jun 2023

método que apila pilas, recibiendo como parámetro una pila

public void stack(Stack<Integer> s) { s.push(4); } Stack<Integer> stack = new Stack<>(); stack(stack); stack;

Want to kickstart your project?Use the new AI Studio to create your code