To create generic method for various User defined class in java
<p>I am trying to achieve the following:
I have this method</p>

<pre><code>public String methodName(Userdefinedclass.class,Userdefinedclass obj)
{

//some code 
.........
method(Userdefinedclass.class);
method2(obj);

}
</code></pre>

<p>I want to generalise this method.</p>

<p>The challenge is that the argument here is user defined, i.e it can change. So please help. </p>
