设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4770|回复: 2

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

[复制链接]
发表于 2010-1-27 11:16:30 | 显示全部楼层 |阅读模式
我在试着编程,很简单的取随机数,可就这样也不对,我不知道哪里错了,编译时没问题,而且在Eclipse环境下运行JSimpleBug的例程也没出错,可为什么我这个简单的试验程序却出错了呢?帮帮忙吧。在Eclipse环境下。. t) `( I3 g  L" \6 v+ e3 G
import swarm.Globals;2 M. {) I/ m- i3 {! S) C, V: N

0 g& {0 b' h3 G& ~9 Bpublic class test {) B5 p0 ^9 y$ s. r7 I9 b6 o( X
/**
4 [4 r# e! t$ z  * @param args: w# K$ }1 Z5 p+ Y
  */0 e, `' `; p; I, p% A. h
public static void main(String[] args) {5 D- |8 l% x- M$ `7 }
    8 E# S- ?0 W3 t; L; ?5 C
     int y=(int)(10*Math.random());
7 [8 g4 J2 l2 [: R4 A5 Y  g# Z     System.out.println("result is "+y);' q  x5 ~9 R7 f- V

  e4 K# I+ R% |" `( b8 F     double z=Globals.env.uniformDblRand.getDoubleWithMin$withMax(0.0, 1.0);
+ N  Q: A+ l3 f) ?; D  System.out.print(z+" re");4 }7 B& `. c6 B2 H3 v; i, P
  }
+ K1 s+ Y( n; p7 t2 j}$ h& U* [' j0 P( K

, P% j. t+ Q2 w% s4 D3 ^$ E8 h结果是:
1 H4 R9 P# n* S% K" rresult is 2
: ?0 [3 x2 N$ |#" Q9 z( V6 S8 J/ {
# An unexpected error has been detected by Java Runtime Environment:
' K& g" z, [/ W& D#& q! T0 Y' i- Z" T: i
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x100b8305, pid=1064, tid=1068
$ ~7 N/ ~4 Z  ~" p#
' o# Z. Q5 L7 N) E5 a+ o. Q" i# Java VM: Java HotSpot(TM) Client VM (1.6.0_01-b06 mixed mode, sharing)
% _5 j3 v* ~3 T. P0 n/ f# Problematic frame:
+ B0 s  P3 A. v# C  [javaswarm.dll+0xb8305]* c/ g1 Q5 J& N/ q+ Q6 z/ v; o; M2 f7 J
#* [1 u* U4 I: Z' ?: ]$ I
# 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, 2025-10-27 18:18 , Processed in 0.014906 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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