Static blank final variable in java

In java, static blank final variable is a variable which is declared with final keyword but not initialised at declaration time. It can only be initialised in static block.
Example

class StaticBlankFinalTest{
	//static blank final variable
	static final String website;
 
	static{
		website = "w3spoint.com";
		System.out.println("website = " + website);
	}
}
public class Main {
	public static void main(String args[]){
		//creating object of StaticBlankFinalTest Class
		StaticBlankFinalTest obj = new StaticBlankFinalTest();
	}
}

Output

website = w3spoint.com

We will get compile time error, if we try to initialize it through any other way except static block.
Example

class StaticBlankFinalTest{
	//static blank final variable
	static final String website;
 
	StaticBlankFinalTest(String website){
		System.out.println("website = " + website);
	}
}
public class Main {
	public static void main(String args[]){
		//creating object of StaticBlankFinalTest Class
		StaticBlankFinalTest obj = new StaticBlankFinalTest("w3spoint.com");
	}
}

Output

Main.java:7: error: variable website might not have been initialized
	}
	^
1 error

Java interview questions on final keyword

Please Share