Why is it useful to pass a class to a method in Java?
<p>This hasn't been covered in my course and I am having trouble thinking up a reason why would I want this. I've come across the code below:</p>

<pre><code>OpenNetworking proxy = service.getPort(OpenNetworking.class);
</code></pre>

<p>In the above line I can see that it is returning the port and it is passing the class to the method but I read this as the <code>OpenNetworking.class</code> isn't instantiated yet. I'm obviously missing something.</p>
