Search:

Type: Posts; User: bespinoz

Search: Search took 0.21 seconds.

  1. Replies
    9
    Views
    5,894

    Re: What is wrong with my code? JAVA-Eclipse

    When I enter this code in Eclipse I get and error at these two lines

    Dice dice1 = new Dice();
    Dice dice2 = new Dice();
  2. Replies
    9
    Views
    5,894

    Re: What is wrong with my code? JAVA-Eclipse

    (Game: craps) Craps is a popular dice game played in casinos. Write a program to play a variation of the game, as follows: Use a class to define the method getDice, and make sure that the method is...
  3. Replies
    9
    Views
    5,894

    What is wrong with my code? JAVA-Eclipse

    import java.util.Random;

    public class Assignment_5_1 {

    public int getDice(){
    Random r = new Random();
    return r.nextInt(6)+1;
    }
    }
Results 1 to 3 of 3