question: public static File addExtension ( File file , String extension ) { if ( extension . startsWith ( "." ) ) { return new File ( file . getAbsolutePath ( ) + extension ) ; } else { return new File ( file . getAbsolutePath ( ) + "." + extension ) ; } }
target:  Append an extension to a file. If extension does not contain a dot, it will be automatically added