Assignment #108: A Refresher

Code

    /// Name: Cassie Rapp
    /// Period: 6
    /// Program Name: A Refresher
    /// File Name: Refresher.java
    /// Date Finished: 3/5/2016
    
    import java.util.Scanner;
    
    public class Refresher {
        
        public static void main(String[] args) {
            
            Scanner keyboard = new Scanner(System.in);
            System.out.println();
            
            System.out.print( "What is your name: " );
            String name = keyboard.next();
            System.out.println();
            
            if ( name.equals( "Josh" ) ) {
                for ( int i=0; i<5; i++) {
                    System.out.println( name );
                }
            } else {
                for ( int j=0; j<10; j++) {
                    System.out.println( name );
                }
            }
        }
    
    }
    

Picture of the output

Assignment 108