sentinel-controlled do/while loop within a for statement
for(int c = 1; c <= teamName; c++)
{
do
{
System.out.printf("\nWhat is the name of team no. %d?", c );
team = input.nextLine();
System.out.printf("\nYou entered %s. Is this correct? Enter 'Y' or 'N':", team );
cont1 = input.next().charAt(0);
input.nextLine();
}
while(Character.toUpperCase(cont1)=='N' );