I was trying to get some code done for class:
public int getValue(char value) { if (value == \'y\') return this.y; else if (value == \'x\') return th
Hope this little example solves your confusion:
public int getValue(int value) { if (value == 'y') return this.y; else if (value == 'x') return this.x; }
If you pass char as an int like getValue('x'), it would return the value of the int.
char
int
getValue('x')