Refresher

Code

import java.util.Scanner;

public class Refresher
{
    public static void main( String[] args )
    {
        Scanner keyboard = new Scanner(System.in);
        
        String name;
        int n = 10;
        
        System.out.println( " What is your name " );
        name = keyboard.next();
        
        while ( n != 0 )
        {
            if ( name.equals("josh"))
            {
                System.out.println( name );
                n= n-2;
            }
            if ( name.equals("Josh"))
            {
                System.out.println( name );
                n= n-2;
            }
            else
            {
                System.out.println( name );
                n= n-1;
            }
        }
    }
}

Refresher

Assignment 108