What I am trying to do :
I am trying to connect to Web Portal [that uses https]using Java. I have written code for supplying user credentials using Authenticator class.W
You've probably used an IDE such as Netbeans to implement an interface / override an abstract class that needs certain methods implementing. When IDEs do this (Netbeans definitely does) they generate method stubs for you like this so the code still compiles but if you try and call a method you haven't actually implemented you get an unavoidable error.
Usually this means you have to implement the given method, but sometimes an implementation does genuinely call for a blank method stub, in which case just delete the line that's throwing the exception.