remove first char from string java code example
Example 1: java remove first character from string
String string = "Hello World";
string.substring(1);
string.substring(0, string.length()-1);
string.substring(1, string.length()-1);
Example 2: how to delete character in string java
# subString(int start, int end);
String a = "Hello!";
b = a.subString(0,a.length()-1) #Remove the last String
# b should be "Hello" then
Example 3: remove part of string java
String text = "Image.png";
String[] cutText = text.split("\\.");