class Temp{
final static int x;
public static void main(String[] args){
}
}
Compilation error: variable x not initialized in the default constructor
Why it says not initialized in default constructor since the variable is static? What is the role of default constructor here?
final, you need to initialize it at the moment of its declaration.