Assignment #61 and Keep Guessing

Code

    /// Name: Lauren Baird
    /// Period: 7
    /// Program Name: Keep Guessing
    /// File Name: KeepGuessing.java
    /// Date Finished: 10/30/2015
        
    import java.util.Scanner;
    import java.util.Random;
            
        public class KeepGuessing
        {
            public static void main( String[] args )
            {
                    
                Scanner keyboard = new Scanner(System.in);
                Random r = new Random();
                    
                int guess;
                int number = 1 + r.nextInt(10);
                    
                System.out.println();
                    
                System.out.println( "I'm thinking of a number from 1-10. Try and guess. " );
                System.out.print( "Your guess: " );
                guess = keyboard.nextInt();
                    
                while (guess != number)
                {
                    System.out.println( "\nThat is incorrect. Try again." );
                    System.out.print( "Your guess: " );
                    guess = keyboard.nextInt();
    
                }
                
                System.out.println();
                System.out.println( "You got it!" );
             }
         }    
    

Picture of the output

Assignment #61