Topic: A strange problem using Eclipse 2.1.1 |
Print this page |
1.A strange problem using Eclipse 2.1.1 | Copy to clipboard |
Posted by: ppp5 Posted on: 2003-10-27 18:21 Hi! I write a small program using Eclipse 2.1.1 editor. My jdk version is 1.4.2_02. I have a strange problem happen. My simple codes are: import java.util.*; public class Random { public static void main(String[] args) { Random rd = new Random(); int va = rd.nextInt(); System.out.println("va = " + va); } } It shows the error message and one warning message: Error message: Error: The method nextInt() is undefined for the type Random Random.java ex03_07/src line 20 Warning message: The import java.util.*; is never used. But I check the Random class is under java.util.*; I don't know why. Is it the Eclipse's bug? I use the JCreator 2.5 without any problem. Thanks. |
2.Re:A strange problem using Eclipse 2.1.1 [Re: ppp5] | Copy to clipboard |
Posted by: ppp5 Posted on: 2003-10-27 18:27 Sorry. I got the problem. It is my problem. I cannot set my java file as Random.java. In JCreator I write Rando.java not Random.java This is my mistake. Thanks. |
Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1 客服电话 18559299278 客服信箱 714923@qq.com 客服QQ 714923 |