Java GoTo Function
//Feeding the dog
void dogFeed()throws IOException{
if (userInput.equals ("Kick the dog.")){
System.out.println ("*Doesn't like to eat.*");
}
//ends here if owner kicks dog
else{
// I need to go back here
while (dogFood < 15){
System.out.println ("*Dog is not yet satisfied, add more food* " + dogFood);
System.out.print("Add a # (of food): ");
String dogFoodAdd = stdin.readLine();
int number = Integer.parseInt(dogFoodAdd);
dogFood = dogFood + number;
break;
}
if (dogFood < 15){
System.out.println ("*Dog is still hungry* " + dogFood);
System.out.println ("Do you still want to feed the dog?");
String feedMore = stdin.readLine();
if (feedMore.equals ("Y")){
// I need to go back to while (dogFood < 15)
}
}
else{
System.out.println ("*Dog is full* " + dogFood);
}
}
}
What I want to do is to go back to while (dogFood < 15) if the user answers "y". I don't know if there is a GoTo function in java. If there is none, then how will I go back to that point? Methinks it's just another loop but I my logic fails me right now.
Thanks!

