don't know how to do this, but is there any way to do something like this
public class Service<T>{
public T save(T object){
//GenericDao is a generic class
GenericDao<object.class> gdao = new GenericDao<>();
gdao.persist(object);
//do some stuffs
}
}
I want pass the class type of the object to instantiate a generic class