Believe it or not, I'm actually having trouble finding information on this. I would like to declare a constant within a method. For example, let's say that my "addRecord" method uses the field name "empleid" many times. Typically in other programming languages, I would declare a constant within the "addRecord" method because... a) I prefer sticking values in variables whenever it's beneficial b) I don't want myself (or anyone else later) to accidentally change this value half-way through the method. How would you properly declare a constant within a method? I tried the following:
But I got an "illegal start of expression" error. Thanks in advance for any help you can give me.