Stack st = new Stack();
boolean boo = st.isEmpty();
System.out.print("初始堆栈是否为空:");
System.out.println(boo);
String s1 = "1" ;
String s2 = "2" ;
String s3 = "3" ;
String s4= "4" ;
st.push(s1);
st.push(s2);
st.push(s3);
st.push(s4);请问;我该如何才能得到栈st的深度?
boolean boo = st.isEmpty();
System.out.print("初始堆栈是否为空:");
System.out.println(boo);
String s1 = "1" ;
String s2 = "2" ;
String s3 = "3" ;
String s4= "4" ;
st.push(s1);
st.push(s2);
st.push(s3);
st.push(s4);请问;我该如何才能得到栈st的深度?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货