question: public static String [ ] splitFileName ( String fileName ) { int pos = fileName . lastIndexOf ( '.' ) ; if ( pos == - 1 ) { return new String [ ] { fileName } ; } return new String [ ] { fileName . substring ( 0 , pos ) , fileName . substring ( pos + 1 ) } ; }
target:  split a FileName in Parts