public class HelloWorld{ public static void main(String[] args){ int num = 999; int count = 0; for(;;){ count++; num = num / 10; while(num>=0) System.out.println("它是个"+count+"位的数!"); } } }
因为你无限循环了,
改为
num = num /
10
;
if
(num<=
0
)
System.out.println(
"它是个"
+count+
"位的数!"
);
break;
public static void (){
System.out.println("你吗的大鸡腿,骗子");