Code
/// Name: Afaf Nabeeha
/// Period: 7
/// Program Name: A Refresher
/// File Name: Refresher.java
/// Date Finished: 3/8/2016 public class Refresher
import java.util.Scanner;
public class Refresher
{
public static void main( String[] args )
{
Scanner keyboard = new Scanner(System.in);
String name;
System.out.print( "What is your name: " );
name = keyboard.next();
if ( name.equals("Josh"))
{
for ( int x = 0; x <= 5; x++ )
{
System.out.println( name);
}
}
else
{
for ( int x = 0; x <= 10; x++ )
{
System.out.println(name);
}
}
}
}
Picture of the output