Hi peeps! I'm having a major problem w/ a java program that I'm suppose to write. If anyone have any idea how to do this, please let me know! I really need the help! Thanks!

Problem:Write a method that computes the sum of the digits in an interger. Use the following method header: public static int sumDigits(long n). For example, sumDigit(234) return 2 + 3 + 4 = 9
Hints: Use % to extract digit and / to remove the extract digit. For example, extract 4 from 234: 234 % 10 = (4). Remove 4, use: 234 / 10. Use loop to repeatedly extract and remove the digit until all digits are extracted.