Practice Java Programs- Class X (ICSE)

Constructor has a same name as the class name.  The question are based on constructor and are really…