设为首页收藏本站

最大的系统仿真与系统优化公益交流社区

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5353|回复: 2

[求助] 好困惑啊,帮帮忙?

[复制链接]
发表于 2010-1-27 11:16:30 | 显示全部楼层 |阅读模式
我在试着编程,很简单的取随机数,可就这样也不对,我不知道哪里错了,编译时没问题,而且在Eclipse环境下运行JSimpleBug的例程也没出错,可为什么我这个简单的试验程序却出错了呢?帮帮忙吧。在Eclipse环境下。
( k3 d* o, |- L& c# Simport swarm.Globals;
9 {* E1 W# M3 t
, h5 X; B  `' u: Z% l3 M" Epublic class test {
$ B" I8 ?9 D8 d7 `: S /**
! E9 l  t" B6 d1 S1 A5 b  * @param args
1 l; A+ C2 u$ `! m% e5 f3 Y+ A  */
. Q$ B, ]( h7 n, b4 d/ | public static void main(String[] args) {
6 _9 `  @; e* Z7 K$ y5 }% Z   
; {1 w$ e$ A% Q- V     int y=(int)(10*Math.random());( ^) q  l) k; I8 Y9 W
     System.out.println("result is "+y);) ]. Z! |5 j, m4 ]4 T6 |, v

/ q& y8 w$ ^' |) U     double z=Globals.env.uniformDblRand.getDoubleWithMin$withMax(0.0, 1.0);4 x  v! m  E/ J
  System.out.print(z+" re");: s4 j, l& U8 `' e, q
  }
) o) Q4 C) j+ m6 P; X0 c}
# `7 l& o, R5 A) w8 `) N7 R7 C) P
结果是:/ B3 {# }& F2 O% O( W. l$ B" U
result is 2% G* @- H4 S/ B# }7 L) o6 ^
#/ P) t* I, @7 R5 W
# An unexpected error has been detected by Java Runtime Environment:$ o. O, O; r- J
#
; V5 p( M9 e6 t( l3 ^1 S#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x100b8305, pid=1064, tid=1068! p) H0 z8 E; W8 f; U
#
7 B+ e9 q7 x& S: v# Java VM: Java HotSpot(TM) Client VM (1.6.0_01-b06 mixed mode, sharing)- S5 P. Q/ f; s8 {
# Problematic frame:+ a( M! ~% u  o" b# n
# C  [javaswarm.dll+0xb8305]  j# G  _- g9 P3 v" V/ K6 D4 Q
#9 I9 C7 c0 e+ k/ h& {+ Y6 U
# An error report file with more information is saved as hs_err_pid1064.log
 楼主| 发表于 2010-2-1 11:07:41 | 显示全部楼层
怎么没有人帮我啊?我很急啊?版主帮帮吧
 楼主| 发表于 2010-2-1 11:11:40 | 显示全部楼层
看来这地方好久都没有人来了?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|手机版|SimulWay 道于仿真   

GMT+8, 2026-2-21 13:41 , Processed in 0.013208 second(s), 14 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表