public String max(List<String> s) {
        String max = "";
        for (String p : s) {
            if (p.length() > max.length()) {
                max = p;
            }
        }

        return max;
    }
public String max ( List < String > s ) { String max = "" ; for ( String p : s ) { if ( p . length ( ) > max . length ( ) ) { max = p ; } } return max ; }
List should be declared as Collection where possible