Assignment #108 Refresher
Code
/// Name: Lacey Reese
/// Period: 5
/// Program Name: Refresher
/// File Name: Refresher.java
/// Date Finished 4/21/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