Are you both in the same class?
In reply to Re: Unable to assign value to constants using ternary operator by marto in thread Unable to assign value to constants using ternary operator by sathya_myl