Question: a named constant is assigned a value that can not change during the running of the program syntax used to declare a named constant: final

a named constant is assigned a value that can not change during the running of the program
syntax used to declare a named constant: final datatype CONSTANTNAME
=
value;
for example: final double PI
=
3
.
1
4
1
5
9
;
in math, pi is known as a constant used to compute the area of a circle
go to page
4
3
of your textbook and read the program under Listing
2
.
4
predict how the program would run and what output would appear in the output window
open a new NetBeans project, using the same name as the book
(
ComputeAreaWithConstant
)
copy the code into your program
(
including the comments
)
run the program; when the program asks for the radius, enter a number in the output window
then: add a command line on the line below your declaration of PI
PI
=
3
;

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!