ok heres my code
import java.util.Scanner;
class TestTelevisionV3
{
public static void main(String [] args)
{
Television tv = new Television (4, 8, true);
tv.printImage();
Scanner myInput = new Scanner(System.in);
String Input1 = myInput.next();
String s1="P";
String s2="C";
String s3="V";
String s4="Q";
do
{
tv.printImage();
System.out.println("");
System.out.println("Press P to turn Power On or Off");
System.out.println("Press C to Change the Channel");
System.out.println("Press V to Change the Volume");
System.out.println("Press Q to quit");
System.out.println("");
if(Input1.equals(s1))
{
tv.setPower();
tv.printImage();
}
else if(Input1.equals(s2))
{
tv.setChannel();
tv.printImage();
}
else if(Input1.equals(s3))
{
tv.setVolume();
tv.printImage();
}
else
{
System.out.println("");
System.out.println("Error - Input not recognised!");
System.out.println("");
}
}while(!(myInput.equals(s4)));
}
}
when i run this code the loop just continues to move by itself without allowing me to make an input how can i change this so that it loops back to when i first make an imput until i input string s4 (Q)