"Storing" a Class to call Static Methods
<p>Lets say I have Class A, that calls static methods in either Class B or Class C. From which class it will call will depend on a parameter passed in the constructor of Class A. The methods in Class B and C that need to be called have identical method signatures. So, is there any way to do something like:</p>

<pre><code>Object call;
if (type == 0)
    call = ClassA;
else
    call = ClassB;

call.someMethod ();
</code></pre>

<p>I know it can be done using an interface and having both class B and C implement the interface but that would require creating an object of B or C each time the call above happens which is quite resource intensive. So, I would like to know if there are any other ways to do this.</p>

<p>Edit: Sorry if this was not clear, but the <code>Object call</code> is a class variable and method calls to Class B and C need to be made in other methods in the class not just the constructor.</p>
