Cited from "HKUSTx: COMP102.1x Introduction to Java Programming - Part 1"
Adding the keyword "final" to the declaration of a variable making the variable constant. For example, "final double bodyWeight;". A value can be assigned to a "final" variable once only.
No comments:
Post a Comment