Can using single-character variable names as parameters in a function okay?For example, look at the code below:public static int factorial (int x) {    if (x == 0) {        return 1;    }    return (x * factorial (x - 1));}In this case, is using variable name x okay as the parameter for the function? In which case would you want to avoid such thing?
Using single-character variable names for function parameters?
coding style
In your factorial example it's perfectly OK. An example of how it would not be OK is:public int calculateInterest(int x, int y, int z){      //////}Because to calculate the interest you need to pass principal, rate and time. Is the coder expected to pass them in that order asumming x is principal, y is rate and z is time? I think not.public int calculateInterest(int principal, int rate, int time){      //////}In this answer from a similar question there's a list of acceptable cases for single-character or two-character variable names.