I have method that returns generic parameter. For example
public E doSmth(E item){
return item;
}
Is there a way to create same method get but only for example String like
public String doSmth(String item){
return item + item;
}
So if i pass String, it works with String, but if i pass anything else it does basic method with generic. Can i somehow do it without error that 'two same methods in class' ?