Constants
A Constants is a named memory location whose value cannot change while the program is running.
Constants are named using identifiers as described above and identified by the keyword final.
final int MAX = 100;
final double PIE = 3.14;
final int MAX_INPUT = 100;
It is common practice in Java, but not a requirement, to name constants with all upper case letters, as shown above.
A Constants is a named memory location whose value cannot change while the program is running.
Constants are named using identifiers as described above and identified by the keyword final.
final int MAX = 100;
final double PIE = 3.14;
final int MAX_INPUT = 100;
It is common practice in Java, but not a requirement, to name constants with all upper case letters, as shown above.
0 comments:
Post a Comment