View RSS Feed

Uncategorized

Entries with no category

  1. Using Random class to generate two numbers

    by , 02-27-2012 at 11:42 PM
    Guys can you please help me out here, I'm using JOptionPane to receive two values from the user I then use these values as a range for my random generator. I then ask the user what's the answer based on a question randomly generated, but since I'm asking a division question how can I make sure that the first value is always bigger than the second?

    Random rand = new Random();
    it val1 = 0;
    it val2 = 0;
    it start = Integer.parseInt(JOptionPane.showInputDialog("enter ...
    Tags: java Add / Edit Tags
    Categories
    Uncategorized