JDK问题 for (i=0;i<=9;i++);//注意这里多了一个分号 System.out.print(" "+stack.pop()); 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 大哥,你检查一下你的代码吧import java.util.*;class test_of { public static void main (String args[]){ int i; Stack stack=new Stack(); for (i=0;i<=9;i++) stack.push(new Integer(i)); for (i=0;i<=9;i++); …这个分号干什么吃的,当然只有9了 System.out.print(" "+stack.pop()); System.out.println(); }} import java.util.*;class test_of { public static void main (String args[]){ int i; Stack stack=new Stack(); for (i=0;i<=9;i++) stack.push(new Integer(i)); for (i=0;i<=9;i++) System.out.print(" "+stack.pop()); System.out.println(); }}这样就对了for (i=0;i<=9;i++);语句多了个;号.以后仔细点。 关于rmi的问题 求解答:JNA中函数指针的赋值问题 请求帮助 关于拖动和窗体事件 有那位大侠有together6 的中文教程,紧急求救,百分相送 在线等,请问如何画这几个同心圆? 一个简单的java拷贝文件问题,想不明白 为什么dialog窗体总是会跳到屏幕的左上角 请给大家提供关于interface(接口)的资料,谢谢。 用Java实现一个小界面 Exception in thread "main" java.lang.NoClassDefFoundError是什么错误? JNI 中内存管理的问题
import java.util.*;class test_of {
public static void main (String args[]){
int i;
Stack stack=new Stack();
for (i=0;i<=9;i++)
stack.push(new Integer(i));
for (i=0;i<=9;i++);
…这个分号干什么吃的,当然只有9了
System.out.print(" "+stack.pop()); System.out.println();
}
}
public static void main (String args[]){
int i;
Stack stack=new Stack();
for (i=0;i<=9;i++)
stack.push(new Integer(i));
for (i=0;i<=9;i++)
System.out.print(" "+stack.pop()); System.out.println();
}
}这样就对了for (i=0;i<=9;i++);
语句多了个;号.
以后仔细点。