java吧 关注:1,289,336贴子:12,816,294
  • 4回复贴,共1

新手求帮助!!!为什么这个结果不对。。。

只看楼主收藏回复

这是我的代码
package thread2;
public class conputetext {
public static void main(String[] args) {
int []b = new int[1000];
for(int i=0;i<b.length;i++){
b[i]=(int)(Math.random()*1000);
System.out.print(b);
}
}
}


IP属地:四川1楼2014-05-29 22:59回复
    我想要正确的输出b 可是为什么出来一些I@126b249这个玩意


    IP属地:四川2楼2014-05-29 23:00
    回复
      2025-11-28 05:28:31
      广告
      不感兴趣
      开通SVIP免广告
      没人理。。。。我再看看书。。。。。


      IP属地:四川3楼2014-05-29 23:03
      回复
        懂了 加一行就ok,要一个一个调用
        for(int a=0;a<b.length;a++){
        System.out.println(b[a]);
        }


        IP属地:四川4楼2014-05-29 23:08
        回复
          A man and woman are in a computer programming lecture. The man touches the woman's breasts.
          "Hey!" she says. "Those are private!"
          The man says, "But we're in the same class!"


          IP属地:湖北5楼2014-05-29 23:09
          回复