Disclaimer: I'm not asking anyone to do my homework, I just need a guiding hand so that I can finish it.

So for my Java class I am to create a Cows and Bulls game. I am not able to use any String methods, Math.pow, Integer.parseInt, or Double.parseDouble. I am also to methods. Basically, how am I to go about doing the following:

getDigit(int number, int i)-take a positive integer number and an index i as parameters and returns the ith digit (from right) of number. If number does not have ith digit, then it returns -1. This method must make call(s) to numDigits (I have this done already).
A TA had mentioned doing something like this

Code:
public static int getDigit(int number, int i){
		
		for(int j = 0; j <= i-1; j++)
		j = (number/10);
		number = number%10;
		return number;
	}
but when I try to call it into the main method I get this

The method getDigit(int, int) in the type dsafhjsd is not applicable for the arguments
(int)
Sorry for it being such a long first post and I realize that many will be hesitant to help me, but any help would be appreciated.

Thanks


EDIT: I was able to get it