> Constants in java ~ Online tutorial

Constants in java

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.

Please Give Us Your 1 Minute In Sharing This Post!
Please Give Us Your 1 Minute In Sharing This Post!
SOCIALIZE IT →
FOLLOW US →
SHARE IT →
Powered By: BloggerYard.Com

0 comments: