You need to write a condition to display the names of the letters beginning in small letters using the String class. Example with the ending of the names on the "ko".

public static void KO(ArrayList<Person> pp ) { for (Person p : pp) { if(p.lName.endsWith("ko")) { System.out.println( p ); } } } 
  • So toLowerCase () converts to lower case, and I need to get names that are only in small letters. Without affecting the names themselves. - Maxim Demyanyuk
  • Yes, you were right. It works that way too. I take off my hat :) - Maxim Demyanyuk

2 answers 2

 Character.isLowerCase( "somestring".codePointAt( 0 ) ) 
     if(p.fName.startsWith(p.fName.toLowerCase()))