question: private static String removeFileNameExtension ( String fileName ) { if ( fileName . lastIndexOf ( "." ) == - 1 ) return fileName ; return fileName . substring ( 0 , fileName . lastIndexOf ( "." ) ) ; }
target:  Removes the extension (whatever comes after the last '.') from the given file name.