jeffheaton's picture
Get the entire book!
Java for the Beginning Programmer

You can also designate a variable as constant. A constant variable may not change its values. Constants are useful to define common numbers, such as pi. To create a constant variable put the keyword final in front of the variable. For example, the following line creates a pi constant.

final double pi = 3.14159265;

Copyright 2005 - 2012 by Heaton Research, Inc.. Heaton Research™ and Encog™ are trademarks of Heaton Research. Click here for copyright, license and trademark information.