Timeline for Student Grades Calculator
Current License: CC BY-SA 3.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Nov 23, 2016 at 20:00 | vote | accept | Adam Hodgson | ||
Dec 23, 2015 at 21:25 | history | edited | Robert Snyder | CC BY-SA 3.0 |
fixed grammer.
|
Dec 23, 2015 at 0:30 | comment | added | janos |
final means it cannot be reassigned to a different value. It makes it easier to understand the code, as every time you see that variable, you know it can only have one value, the one it was initialized with.
|
|
Dec 22, 2015 at 20:01 | comment | added | Robert Snyder | Emz is spot on in defining it. I like to consider as a small form of documentation too. If I see private only it means I could have a getter or setter on that field. If i see private final I know that is either used explicitly by this class, or that it has a getter only. (less things for me to look up if needed, or when I come back to it later) | |
Dec 22, 2015 at 19:02 | comment | added | Emz |
private makes sure nothing outside of the class can access it, final is for not re-declaring in this case.
|
|
Dec 22, 2015 at 18:56 | comment | added | Adam Hodgson | Thanks very much for your answer, it has definitely been very helpful! I would like to ask why you have chosen to declare StudentData[][] as both private and final? It was my understanding that since private already prevents overriding adding the final keyword is considered redundant. | |
Dec 22, 2015 at 4:16 | history | answered | Robert Snyder | CC BY-SA 3.0 |