I have added the
final
keyword to all the constants in the class. Yet the code still failspackage en.codegym.task.pro.task06.task0614;
/*
Remembering geometry
*/
public class Solution {
public static final double pi = 3.14;
public static final double radius = 2.5;
public static final double diameter = 5;
public static void main(String[] args) {
System.out.println("The area of the circle is: " + pi * radius * radius);
System.out.println("The perimeter of the circle is: " + pi * diameter);
}
}