Which of the following would be a good variable name for the current value of a stock?
a) curstovalb) theCurrentValueOfThisStockIs
c) currentStockVal
d) csv
e) current
Answer: c.
Explanation: Java allows long variable names but the programmer must find a good compromise between an excessive long name (as with b) and names too short to understand their use (a and d). The name current possibly might be reasonable if there are no other “current” values being referenced in the program.