Skip to content

Instantly share code, notes, and snippets.

@mourawaldson
Created April 28, 2012 21:35
Show Gist options
  • Save mourawaldson/2522202 to your computer and use it in GitHub Desktop.
Save mourawaldson/2522202 to your computer and use it in GitHub Desktop.
Get file extension
import java.io.File;
/**
* Retorna a extensão do arquivo.
*
* @param file
* @return string Extensão
*/
public static String getExtension(String file) {
return file.substring(file.lastIndexOf(".") + 1, file.length());
}
@mourawaldson
Copy link
Author

Yes, can be!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment