jhebda
11-05-2002, 11:39 PM
Hi,
I have not used Java in about four years, and when I did use it ages ago, it was not much.
I am attempting to write some code to test a reinforcement learning algorithm and am having a little trouble remembering some basic syntax rules. Can someone help with the following questions if possible:
-When initializing an array in Java, how can I set all array values NULL? Right from the start i'll need to compare them against integer values, both negative and positive, so would like to initialize them as null somehow if possible.
-Is there a built in Java function to create random numbers within a certain range? (I know I can use a rand function and scale it accordingly), but I was wondering if there was a built in function to create a random integer, say, between 0 and 4 inclusive.
Thanks for your help!
John Hebda
I have not used Java in about four years, and when I did use it ages ago, it was not much.
I am attempting to write some code to test a reinforcement learning algorithm and am having a little trouble remembering some basic syntax rules. Can someone help with the following questions if possible:
-When initializing an array in Java, how can I set all array values NULL? Right from the start i'll need to compare them against integer values, both negative and positive, so would like to initialize them as null somehow if possible.
-Is there a built in Java function to create random numbers within a certain range? (I know I can use a rand function and scale it accordingly), but I was wondering if there was a built in function to create a random integer, say, between 0 and 4 inclusive.
Thanks for your help!
John Hebda