I have no idea what you're asking. But I'll take a guess. You want to keep going until they enter "no"?
String keepGoing;
do {
some stuff
keepGoing = .... ; // read input with Scanner or whatever
} while (!keepGoing.equals("no")); // or equalsIgnoreCase("no") to allow NO, No, nO.