I am trying to write Java code to obtain the last digit of a long (i.e. the rightmost digit).
If I were trying to obtain the last element of a string, I would use the substring() method.
What is the alternative or equivalent way when getting the last digit of a long?