In Java, you have three basic "kinds" of fields, class, instance, and local (this is a simplification.)
Class fields have a static modifier. All instances and all methods share these fields.
Instance fields are defined outside of any method. All instance (non-static) methods of the instance share these fields.
Local fields are defined inside a block; a method is a kind of block. These are shared only inside the block.
Parameters are a special form of local fields where the method is the containing block.
In your code, you have two sets of fields with the same names, one set are instance, one set are local (parameter.) This leads to the local fields "hiding" the instance fields.
You have a couple means of dealing with hiding. One is to rename one set of fields or the other. This is the approach I use. The other is to "qualify" the instance fields using "this." This tells the compiler that you want to always look at the instance to find the fields.
The reason you passed values to your constructor as parameters was to initialize the the instance fields. That way, the instance will be able to use those values once the constructor completes and other methods are called.