+ -
当前位置:首页 → 问答吧 → 求教:java random and command-line args[已解决]

求教:java random and command-line args[已解决]

时间:2014-04-05

来源:互联网

Command-line arguments 方面:
我照样copy 一段在textbook既CODE入NETBEAN, 但出来效果系话args[0]有exception error;
我亦上网search过,主要问题系无pass string 入去, 我可以点好似text book 咁pass入去?

random方面:
如果我把n个人的名字,randomly地列出来,可以点写?
e.g: name[0]="peter";
name[1]="jason"
name[2]="ken"
==>
output:
jason
ken
peter
我唔知可以点解决..有心师兄请 求教

[ 本帖最后由 tcuay 於 2014-3-8 06:24 PM 编辑 ]
附件 output.png (300.55 KB)

2014-3-8 02:50 PM

Command-line argument;

testpro.png (228.22 KB)

2014-3-8 02:50 PM

my NetBean output;

output.png (300.55 KB)

2014-3-8 02:50 PM

Command-line argument;

testpro.png (228.22 KB)

2014-3-8 02:50 PM

my NetBean output;

作者: tcuay   发布时间: 2014-04-05

Problem solved....
no need to ans me la.. thanks

作者: tcuay   发布时间: 2014-04-05