Answers for "how to delete first number java"

5

java remove first character from string

String string = "Hello World";

//Remove first character
string.substring(1); //ello World

//Remove last character
string.substring(0, string.length()-1); //Hello Worl

//Remove first and last character
string.substring(1, string.length()-1); //ello Worl
Posted by: Guest on June-25-2020
1

java remove first digit from int

int x = 123456789;
int new_x = Integer.parseInt(Integer.toString(x).substring(1));
Posted by: Guest on April-03-2021

Code answers related to "how to delete first number java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language