I'm new to programming java and i need to make random integers between 2 values. I could not find any relevant info in the oracle tutorials.
because i'm new to java, most of what i researched i don't understand. I have looked at the following:
http://docs.oracle.com/javase/7/docs/api/java/util/Random.html
Generating a Random Number between 1 and 10 Java
http://www.javapractices.com/topic/TopicAction.do?Id=62
How do I generate random integers within a specific range in Java?
Getting random numbers in Java
i have tried:
import java.util.Random;
public static void main(String[] args) {
Random randint = new Random();
System.out.println(randint);
result:
java.util.Random@52e922
it appears to be printing the type of randint
.
so, how do i create a random integer between 2 values, and then print the result to the screen?