设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6210|回复: 2

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

[复制链接]
发表于 2010-1-27 11:16:30 | 显示全部楼层 |阅读模式
我在试着编程,很简单的取随机数,可就这样也不对,我不知道哪里错了,编译时没问题,而且在Eclipse环境下运行JSimpleBug的例程也没出错,可为什么我这个简单的试验程序却出错了呢?帮帮忙吧。在Eclipse环境下。$ u" V, ?% ?5 z, G/ {
import swarm.Globals;" x# Q! o- f% Y& y
) _1 [$ o6 P( h
public class test {  o, H; K) d' R
/**
* k2 B' X) @9 o# N, V; g% l5 W  * @param args/ A0 ?+ L! b3 Q' o; f
  */
: O6 `3 e7 F% T! f public static void main(String[] args) {( N0 K5 f/ F; \9 p* |4 O2 f
   
) r% q" _* W8 a- V2 N7 T     int y=(int)(10*Math.random());
- O8 K( ^  ^+ }) G     System.out.println("result is "+y);
5 B/ ]2 T' {  \' e& `7 P: z# l6 T( k: c) D( z4 c
     double z=Globals.env.uniformDblRand.getDoubleWithMin$withMax(0.0, 1.0);
5 F. e# n+ @# S4 v( U$ g6 G& i  System.out.print(z+" re");
% A3 W6 ?. c* G8 J- ]# ]7 _  }6 |# \0 o+ P$ \) D3 R
}
4 U9 w$ |! z( S; D# ]& X$ B9 k3 Y& i' r6 N
结果是:+ E" H; d2 ]1 r4 v
result is 2
* d% ?$ ]4 H3 k$ d1 l5 }#
* _4 Q- d0 v( H: L# Z3 x7 P# An unexpected error has been detected by Java Runtime Environment:, F7 v# p5 Z' Y9 e# Z0 U  i( n3 P
#7 i0 n6 [% z; x) m$ L3 J
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x100b8305, pid=1064, tid=1068
9 L; I+ s* u+ _4 J% l/ C1 s& l3 E#6 V! F" h- W( T# A+ @
# Java VM: Java HotSpot(TM) Client VM (1.6.0_01-b06 mixed mode, sharing)# z- ~2 y% n% x& a
# Problematic frame:7 Z/ u6 [, c# O
# C  [javaswarm.dll+0xb8305]
3 n) Z4 Z  K4 b. O#
0 b& B1 {% O# ~0 P3 V9 h7 d2 D# 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-7-1 07:34 , Processed in 0.014070 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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