If I declare a constant like static final double PI; I’ll get The blank final field PI may not have been initialized error. Why can’t I declare it this way first and initialize it later?
UPDATE: I might not know the initial constant value and have to initialize it after some logic so that I can have a value for it. That’s why I need to initialize it later.
Java has to make sure that a final field is only initialized once and never changes. This can only happen during initialization.