This could be very basic question but I am not able to figure out this, I am trying to call a function from some library. The signature of this function is as follows.
<V> Channel<?,V> create(@Nonnull ChannelSetting setting);
I am calling this method by simply passing an object of ChannelSetting in param, And I want to assign its returned result in Channel<String, SomeClassType> object. If I am doing it as follows,
Channel<String, SomeClassType> result = creatorObj.create(setting);
I a getting compilation error Type Mismatch.
Type mismatch: Cannot convert from Channel<capture#1-of ?, Object> to Channel<String,SomeClassType>
I am not understanding how to assign return type, I can not leave <?> because I need it for specific type only.
Thanks,