java remove last character from string

https://w‮uttual.ww‬ri.com
java remove last character from string
public static String removeLastCharacter(String str) {   
	String result = null;   
    if ((str != null) && (str.length() > 0)) {      
    	result = str.substring(0, str.length() - 1);   
    }   
    
    return result;
}
Created Time:2017-09-06 08:50:56  Author:lautturi