Month: February, 2008

The difference between Java’s “final” and C#’s “const”

15 February, 2008 (20:01) | .Net, Java, C#, Computer Science

Final in Java is used to declare a class that can’t be subclassed, a method that can’t be overridden, or …
A final variable means the value won’t change, but the value can still be determined at run time:

final int i;
if ( j > 0 ){
i =1;
} else {
i = […]