// Java Constructor as final import java.io.*; class Example { // Example() constructor is declared final final Example() { // This line can not be executed as compile error // will come "Hey you have declared constructor as final, it's error"); } } class Main { { // Object of Example class created // Automatically Example() constructor called Example obj = new Example(); } }