Assignment #109 Refresher Challenge

Code

    /// Name: John Huh
    /// Period: 6
    /// Program Name: Refresher Challenge
    /// File Name: RefresherChallenge.java
    /// Date Finished: 4/13/2016
    
        import java.util.Scanner;
     
        public class RefresherChallenge
        {
            public static void main( String[] args )
            {
                
                Scanner keyboard = new Scanner(System.in);
                String name;
                System.out.println();
                System.out.print( "What is your name: " );
                name = keyboard.next();
                System.out.println();
                
                 for ( int times = 0; times < 10; times = times + 1 )
                    {
                     if ( name.equals("Josh") )
                     {
                         times = times + 1;
                     }
                     System.out.println( name );
                 }
                System.out.println();
            }
        }
    

Picture of the output

Assignment 1