Java remove the last character from string

Java remove the last character from string
refer t‮tual:o‬turi.com
/**
 * @author lautturi.com 
 * Java example:  remove last character from string in java
 */


import java.util.*;
import java.util.regex.*;

public class Lautturi {

	public static void main(String[] args) {
		String str = "welcome to lauttur! java world";
		String newStr = str.substring(0, str.length()-1);
		System.out.println(newStr);
	}
}

output:

welcome to lauttur! java worl
Created Time:2017-10-07 15:19:42  Author:lautturi