Forums Register Login
Cannot use Random type

I'm quite new at Java, although I have other programming experience.

I'm trying to compile a code sample, which makes use of the Random type. The problem is that Eclipse produces the following error message:

The import android.util.Random cannot be resolved

This seems, strange, because in the Type Hierarchy browser I can easily find the unit and the Random type. I'm using Eclipse Juno, 20121004-1855 with Android SDK at API level 17. Not sure what other information would be needed to resolve this error.

Any help is greatly appreciated!

Sorry for bother you guys, I just found the solution: I should have imported java.util.Random, rather than android.util.Random!
Wink, wink, nudge, nudge, say no more ... https://richsoil.com/cards

This thread has been viewed 1762 times.

All times above are in ranch (not your local) time.
The current ranch time is
Jun 22, 2018 20:56:48.