Java Rock/Paper/Scissors Game For my computer science class I am tasked with writing a rock/paper/scissors game. I understand how to write the game, but I was wondering if someone more experienced than I could give me some pointers on how to become a better programmer. 

Is there anything I could do to reduce the size of the code, but without diminishing functionality? 

public class RockPaperScissors 
{
    static double wins = 0;
    static double losses = 0;
    static double draws = 0;
    static double games = 0;

    private static void lose() {
        System.out.println("YOU LOSE! :D");
        losses++;
        games++;
    }

    private static void win() {
        System.out.println("you win :D");
        wins++;
        games++;
    }

    // main method
    public static void main(String[] args) 
    {
        Scanner scan = new Scanner(System.in);

        // variables
        Integer answer1 = 0;
        boolean playing = true;

        // start of game
        do 
        {
            // main menu
            System.out.println("Input R, P, S, or Q(to quit).");

            // player's move
            String answer = scan.next();
            answer = answer.toLowerCase();

            // converts player's move from str to int
            switch (answer.charAt(0))
            {
            case 'r':
                answer1 = 0;
                break;
            case 'p':
                answer1 = 1;
                break;
            case 's':
                answer1 = 2;
                break;
            case 'q':
                System.out.println("User exit.");
                double winP = wins/games*100;
                double loseP = losses/games*100;
                double drawP = draws/games*100;
                System.out.println("Wins: " + wins);
                System.out.printf("%.2f", winP);
                System.out.println(" Percent");
                System.out.println("Losses: " + losses);
                System.out.printf("%.2f", loseP);
                System.out.println(" Percent");
                System.out.println("Draws: " + draws);
                System.out.printf("%.2f", drawP);
                System.out.println(" Percent");
                playing = false;
                break;
            default: 
                System.out.println("ERROR!!");
                playing = false;
                break;
            }

            // checks for conditions
            if (playing) 
            {
                // computer's move
                Random random = new Random();
                Integer choice = random.nextInt(3); // (n-1) 0 = rock, 1 = paper, 2 = scissors
                String comp = choice.toString();
                switch (comp)
                {
                case "0":
                    System.out.println("computer chose rock");
                    break;
                case "1":
                    System.out.println("computer chose paper");
                    break;
                case "2":
                    System.out.println("computer chose scissors");
                    break;
                default:
                    System.out.println("ERROR!");
                    break;
                }
                // checks results
                if (answer1 == choice)
                {
                    System.out.println("Draw");
                    draws++;
                    games++;
                }
                else if ((answer1 + 1) % 3 == choice)
                    lose();
                else if ((choice + 1) % 3 == answer1)
                    win();
                else
                    System.out.println("ERROR! ERROR!");
            }           
        } while (playing);
    }
}
What do you mean by "reduce the size"? Code or byte-code?
If it's code you can easily remove a few lines by merging your System.out.print*():

System.out.printf("Wins: %d %.2f%%\nLosses: %d %.2f%%\nDraws %d %.2f%%",
    wins, winP, losses, loseP, draws, drawP);


Also, what is the use of transforming Integer into a String for the switch()? switch() on String was introduced in Java 7. A better-optimized version would be to use int directly:

int choice = random.nextInt(3); // (n-1) 0 = rock, 1 = paper, 2 = scissors
switch (choice) {
    case 0:
        ...
}


You can also have a String[] to store what you want to display:

String[] rps = { "rock", "paper", "scissors" };
if (choice &gt;= 0 &amp;&amp; choice &lt; rps.length)
    System.out.println("Computer chose "+rps[choice]);
else
    System.out.println("Wrong choice!");
// Or use ternary operator:
//System.out.println(choice &gt;= 0 &amp;&amp; choice &lt; rps.length ? "Computer chose "+rps[choice] : "Wrong choice!");


For byte-code size you can use primitive int instead of class Integer. And also int for your wins, losses, draws and games variables: ++ incrementation is a lot faster on int than on double. You can convert them to double only when computing the percentage (and correct a potential percentage calculation bug when using integer arithmetics):

loseP = 100.0 * losses / games; // 100.0 is a double, so 100.0 * losses is a double and (100.0 * losses) / games is also a double
// loseP = losses/games*100 will always be an int: losses and games are int, losses/games is an int, 100 is an int and losses/games*100 is an int


I'll let you figure out the rest :)