How do I define a constant in Java?
Printable View
How do I define a constant in Java?
Hey mark,
defining constants....
usually it must have static and final keywords and the variable are usually in all upper case. For example:
public static final double PI=3.141562 //close enough:)
Manoj
Thanks sweetsupra
Its a bit long-winded isn't it!
mark:
java is long winded:)
Manoj