let’s say I have the following variables:
int currentCreated = 94.6;
int averageCreated = 80.1;
int currentAssigned = 78.9;
int averageAssigned = 81.3;
How would one determine the biggest variable? I mean, I can easily do the number itself with Math.max, but I’m interested in the biggest value and variable name.
Thanks!
If you want to check value and the actual name itself, your best bet may be to use an associative array or an object and check the length of the keys, and their values. I cannot immediately think of any other way to accomplish this.
Example: