Here are some hints you may need:
1) If you use
/ on arguments which will be integers then your result will also be integer.
int x = 7/2; System.out.println(x);
So to get rid of last digit of integer all you can do is divide this number by 10 like
int x = 123; x = x/10; System.out.println(x);
2) Java also have modulo operator which returns reminder from division, like
1 will be reminder. This operator is
int x = 7; x = x % 5; System.out.println(x);
7/5=1 (2 remains)
So to get last digit from integer you can simply use
% 10 like
int x = 123; int lastDigit = x%10; System.out.println(lastDigit);
Now try to combine this knowledge. Get last digit of number, add it to sum, remove this last digit (repeat until will have no more digits).