How To Define A Constant Variable In Java


  • 29 Dec, 2011

    The variable should be declared as static and final. So only one copy of the variable exists for all instances of the class and the value can't be changed also.static final int PI = 2.14; is an example for constant.

    Comments Received:
    Please give your suggestions and feedback:

2009-2016 downloadmela.com. All rights reserved.