I just want continue a program when a user presses the y key with a do while
loop in this code e.g. while('o'!=='y')
. I have also tried this:
public class clac {
do {
System.out.println("\nwant to try again\n press y/n");
String o;
o=sc.next();
} while(!o.contentEquals("y"));
}