learning-java-2825378
learning-java-2825378 copied to clipboard
03 06b
package com.company; import java.util.Scanner; public class Main {
public static void main(String[] args) {
Scanner input = new Scanner (System.in);
boolean isOnrepeat =true;
while (isOnrepeat) {
System.out.println( "Playing current song");
System.out.println( "Would you like to take this song off of repeat? if so, answers yes");
String userinput =input.next();
if (userinput.equals("yes")) {
isOnrepeat =false;
}
System.out.println( "Playing next song");
}
}
}