[单选题]public class StackTest {public static void main(String[]args) {Stack<Integer>st=newStack<Integer>( );st.push(newInteger(11));st.push(newInteger(22));st.push(newInteger(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( ));}}
北开题库
|
2023-10-01 08:01:46
|
17
[单选题]public class StackTest {public static void main(String[]args) {Stack<Integer>st=newStack<Integer>( );st.push(newInteger(11));st.push(newInteger(22));st.push(newInteger(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( ));}}

A.size is-> 4 Top is-> 33 new Top is-> 22
B.size is-> 3 Top is-> 33 new Top is-> 22
查看答案

国家开放大学

形成性考核

您可能感兴趣的试题
TOP