title: How to access the abstract class method without extending the Abstract class in java
body: <p>I am new to java and when i am searching over internet for getting the HTTP response code through java, i came to know about <code>[HttpURLConnection]</code> Class in java. This class is abstract class hence i cant instantiate this class. So my queestion is I have a <code>URL</code> object and how to use this abstract class in my code. This could be Very Basic Question but your answer would help to understand java fundamentally.</p>
  
  <p>Thanks in Advance</p>
  
  <p><a href="https://docs.oracle.com/javase/8/docs/api/java/net/HttpURLConnection.html" rel="nofollow noreferrer">https://docs.oracle.com/javase/8/docs/api/java/net/HttpURLConnection.html</a></p>