your class name is testconstructor.
A constructor must have the same name and no return type, e.g.:
You wrote a method that had the same name as the class, but no constructor. It is no constructur because it has a return type, even when the return type is void. This was legal, but the method was not called as you constructed an object of the class:
So x and y are still 0.
Hope it helps,