Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public List<Country> getCountryNameStartsWithC(List<Country> countryList) {
- List<Country> countryNameList = new ArrayList<>();
- for (Country country : countryList) {
- if (country.getCountryName().startsWith("C")) {
- countryNameList.add(country);
- }
- }
- return countryNameList;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement