Assignment #109 and Refresher Challenge

Code

                        /// Name: Graham Pollock
                        /// Period: 5
                        /// Program Name: Refresher Challenge
                        /// File Name: RefresherChallenge.java
                        /// Date Finished: 04/15/2016/

     
    import java.util.Scanner;

    public class RefresherChallenge
    {
        public static void main(String[] args)
        {
            Scanner k = new Scanner(System.in);
            int max = 10;
            
            System.out.print("Your name: ");
            String name = k.next();
            System.out.println();
            
            if ( name.equals("Josh") )
                max = 5;
            
            for ( int i = 0; i < max; i++ ){
                System.out.println(name);
            }
        }
    }
    

Picture of the output

Assignment