the reason is that in constructors we pass the values at the time of the object creation of the class.so thats why the name of the constructor should be the same so that it can take passed values and initialized at the time of the object creation of the class.