 <p>So, essentially what you're doing here is dynamic dispatch. by specifying </p> <pre><code>Request request= new AddressRequest (); </code></pre> <p>what you're doing is saying this Request is an AddressRequest, but by calling it a Request you are unable to access the method for AddressRequest.</p> <p>A quick solution would be to Safe Cast -> If you're sure that you're dealing with and AddressRequest, then cast request as </p> <pre><code>(AddressRequest) request.setUserId("11"); </code></pre>