Answer the question
In order to leave comments, you need to log in
Reading the last characters from a variable?
So, I have a variable of type String, its length is always fixed, I need to make the removal of the last 4 characters into a variable
Answer the question
In order to leave comments, you need to log in
String str = ...;
String substr = str.substring(str.length() - 4);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question