Search:

Type: Posts; User: jean28

Search: Search took 0.09 seconds.

  1. Replies
    7
    Views
    1,088

    Re: How to use a Random object here?

    I found this example online that looks dangerously similar to what I am trying to do, but to a much simpler extent:



    private static String person() {
    String name;
    switch...
  2. Replies
    7
    Views
    1,088

    Re: How to use a Random object here?

    I saw that in order to get 3 random variables I need to set the nextInt to 2 so that I get a 3 possible numbers: 0,1, and 2. That is why I put 2 inside the nextInt that gets the random objects from...
  3. Replies
    7
    Views
    1,088

    Re: How to use a Random object here?

    Ok, I will try to do a more specific description here.

    When I run this code:



    asteroids.get(i).translate(0, asteroids.get(i).getSpeed());
    // Displays one asteroid on the screen:...
  4. Replies
    7
    Views
    1,088

    How to use a Random object here?

    Hey guys, I have a problem here which I am trying to fix. I have a for loop, and inside it there are 3 cases that I want to implement randomly. The cases involve asteroids falling down a screen on...
Results 1 to 4 of 4