I have to enter cities in an array list and then analyze the inputted citites to find the city with the most upercase letters. But i cannot figure out the code to anylyze the enteries in the arraylist and find the word with the most uppercase letters.
package cirties2;
import java.util.Scanner;
import java.util.*;
public class Cirties2 {
public static void main(String[] args)
{
Scanner city = new Scanner(System.in);
System.out.println("Enter the cities<enter stop to exit>");
List<String> cities = new ArrayList<String>( );
boolean thing = true;
while(thing)
{
String s = city.nextLine( );
if(s.equalsIgnoreCase("stop"))
{
System.out.println(cities);
break;
}
else
{
System.out.println("Enter the cities<enter stop to exit>");
cities.add(s);
}
}
}
}