Remembering geometry

  • 7
  • Locked
Take a look at what the program does. Add the final modifier to standard constants (variables with immutable values).
You can't complete this task, because you're not signed in.
Comments (2)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
atb2199
Level 16 , United Kingdom, United Kingdom
31 August, 14:46
Pi is the only constant here. The radius/diameter of a circle is variable.
UltraGameCoder Java Developer
24 June, 11:36
Applying final to all 3 global static variables results in an incorrect solution that gives the tip to check if radius is marked as final. While it is marked as final. But in order to have a correct solution, its checked if only the pi variable is marked as final while the other 2 variables should be as well as they won't be changed within the program.