This is the code I have and using Java/Selenium. How to return a new instance of T? For non generic method the return would be return new ClassName(Driver);
In C# its >> return (T)Activator.CreateInstance(typeof(T), Driver);
public <T> T MethodName(String pane) throws InterruptedException
{
// Some operations take place here
Thread.sleep(3000);
**// I want to return new T(Driver); How to to do this????**
}