Java tutorial
//package com.java2s; public class Main { public static String getSuffix(String str) { int i = str.lastIndexOf('.'); if (i != -1) { return str.substring(i + 1).toUpperCase(); } return str; } }