Topic: 一个迷惑几天的问题(if(c[t]=false){...) |
Print this page |
1.一个迷惑几天的问题(if(c[t]=false){...) | Copy to clipboard |
Posted by: yangzhen1983 Posted on: 2005-10-19 21:16 Random rand =new Random(); String[] b={"wo","ni","ta"}; String[] a=new String[3]; boolean c[]=new boolean[b.length] for(i=0;i<3;i++) {t=rand.nextInt(b.length); if(c[t]=false) {a[i]=b[t]; System.out.println(a[i]);} c[t]=true;} 我想把b数组随即的但不重复的拷到a中,为什么的写的程序实现不了那?谁帮我看看啊 |
2.Re:一个迷惑几天的问题 [Re: yangzhen1983] | Copy to clipboard |
Posted by: linjie1918 Posted on: 2005-10-19 22:00 能说清楚点吗???? |
3.Re:一个迷惑几天的问题 [Re: yangzhen1983] | Copy to clipboard |
Posted by: andykid Posted on: 2005-10-19 22:37 if(c[t]=false)??? 窃以为似是if(c[t]==false)之误 |
4.Re:一个迷惑几天的问题(if(c[t]=false){...) [Re: yangzhen1983] | Copy to clipboard |
Posted by: yangzhen1983 Posted on: 2005-10-19 23:21 谢谢:linjie1918 就向你说的那样 |
Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1 客服电话 18559299278 客服信箱 714923@qq.com 客服QQ 714923 |