[单选题]public class StackTest {public static void main(String[] args) {Stackst = new Stack( );st.push(new Integer(11));st.push(new Integer(22));st.push(new Integer(33));System.out.println(size is-> +st.size( ));System.out.println(Top is-> +st.peek( ));st.pop( );System.out.println(new Top is-> +st.peek( ));}}程序运行的结果是 size= ( )。
北开题库
|
2023-10-01 08:01:46
|
24
[单选题]public class StackTest {public static void main(String[] args) {Stackst = new Stack( );st.push(new Integer(11));st.push(new Integer(22));st.push(new Integer(33));System.out.println(size is-> +st.size( ));System.out.println(Top is-> +st.peek( ));st.pop( );System.out.println(new Top is-> +st.peek( ));}}程序运行的结果是 size= ( )。

A.size is-> 3 Top is-> 33( new Top is-> 22
B.size is-> 3 Top is-> 33 new Top is-> 22
C.size is-> 3 Top is-> 11 new Top is-> 33
D.size is-> 2 Top is-> 33 new Top is-> 11
查看答案

国家开放大学

形成性考核

您可能感兴趣的试题
TOP