Untitled

 avatar
unknown
plain_text
a year ago
493 B
4
Indexable
// Online Java Compiler
// Use this editor to write, compile and run your Java code online

class HelloWorld {
    public static void main(String[] args) {
        final double PI = 3.14; // Final is a keyword used in FRONT of a variable declaration that makes it constant (which cannot be changed). Constants are usually capitalized
        System.out.println(PI);
        // PI = 4.2; (If we tried to change the PI variable, it would cause an error bcz PI was declared to be a final)
    }
}
Editor is loading...