设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5422|回复: 2

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

[复制链接]
发表于 2010-1-27 11:16:30 | 显示全部楼层 |阅读模式
我在试着编程,很简单的取随机数,可就这样也不对,我不知道哪里错了,编译时没问题,而且在Eclipse环境下运行JSimpleBug的例程也没出错,可为什么我这个简单的试验程序却出错了呢?帮帮忙吧。在Eclipse环境下。
8 D7 C/ x) x# s, p+ bimport swarm.Globals;3 j  _9 Z2 ~% j4 l6 @
! B& H* h, Q; A; r' ?3 v; M
public class test {
2 }/ a1 r* u* M. l1 ?' J( y' O /**6 S* R0 p( p" a' }# y
  * @param args
) W; k2 k2 s2 r3 J5 `# [  */
' g% {% T+ ^$ d0 p# }7 ^; n' k* r9 V public static void main(String[] args) {
( e! }& j3 |' v7 t9 g   
9 b+ [1 U4 K  R     int y=(int)(10*Math.random());  U- q1 \9 Z3 x3 A- {1 ]6 f
     System.out.println("result is "+y);5 P2 Q. `/ O% V, [# @) `' w/ \1 Q

9 w3 x/ f6 _7 \. L% r     double z=Globals.env.uniformDblRand.getDoubleWithMin$withMax(0.0, 1.0);
4 C: _1 R2 Q0 \0 ]# H2 v% o  System.out.print(z+" re");
9 Y- A$ ~6 z, X" K0 l  }# m% n% E0 J, ^$ s4 Z9 ]
}3 p. p$ \, D+ `4 b

( o. l2 T1 I- j+ D% [% N2 f结果是:5 ~* n/ W9 ]+ A- u$ m6 b
result is 2
, @, H3 I# O9 V% u* J! M#
! h/ r3 S1 d2 X- N4 r3 h  m0 a# An unexpected error has been detected by Java Runtime Environment:
1 Y1 Y" P% q4 P) S/ G## u0 V) ^4 m: S2 ~3 t
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x100b8305, pid=1064, tid=10689 I8 B% f) U4 l+ K
#5 Z$ U* S2 T3 W% ?' z- E
# Java VM: Java HotSpot(TM) Client VM (1.6.0_01-b06 mixed mode, sharing)
5 J5 \- L/ k/ U- g# Problematic frame:
: b: `/ t' ?0 ?9 ]6 a  P# C  [javaswarm.dll+0xb8305]4 ~/ u- A2 H& s! V
#! G) W$ X6 h) d2 y8 U& f5 y) L
# 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-3-4 08:08 , Processed in 0.020787 second(s), 14 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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