This site requires JavaScript, please enable it in your browser!
Greenfoot back
Roshan123
Roshan123 wrote ...

2020/7/9

random nu.

1
2
Roshan123 Roshan123

2020/7/10

#
thanks to both of you now its working
danpost danpost

2020/7/10

#
SteveB wrote...
So, no key was pressed since the last call, and it returned null. You can't call toLowerCase() on null, thus you get the exception.
I threw the toLowerCase in hastily without regard to the fact that getKey returns null until a key is input. My apologies.
Roshan123 Roshan123

2020/7/12

#
a little problem is their i want the random no. not to be repeated for example --- a,f,d,u,i,i
danpost danpost

2020/7/12

#
Roshan123 wrote...
a little problem is their i want the random no. not to be repeated for example --- a,f,d,u,i,i
Use a List object instead of the Array object ; then you can remove objects from the list as they are used. You will also then need do something about when the list becomes empty.
You need to login to post a reply.
1
2