发布网友 发布时间:2022-04-25 16:04
共1个回答
热心网友 时间:2023-10-15 20:35
package table;
import java.util.Stack;
import javax.swing.JFrame;
public class Txt extends JFrame
{
public static void main ( String[] args )
{
Stack<Integer> stack1 = new Stack<Integer> ();
stack1.push (1);
Stack<Integer> stack2 = (Stack<Integer>) stack1.clone ();
stack1.clear ();
System.out.println (stack2);
}
}