Thursday, August 11, 2011

Java Constants


http://www.tech-faq.com/how-to-declare-a-constant-in-java.html

There is no 'const' declaration in Java.  Use static and final instead.

Use static and final to create 'constant' like declarations.

public static final int MAX_WIDTH = 10;

Java constants



No comments:

Post a Comment