Plus "+" is an overloaded operator. It concatenates strings, or adds numbers. The type of input is generic, so it is unclear how to compile it. Have you tried to compile your code? I bet it does not work. So you need to write one method for String and another for numbers. Using numbers, you can use "T extends Number" and instead of "t1 + t2", you can use "t1.doubleValue() + t2.doubleValue()".
If you want to have only a single method to handle all, you can define an interface with an "add(t1,t2)" method and implement it in a derived class (derived from String, Integer, Double etc.). Or an easier possibility, but not good code practice: instead of using generic types, define method arguments as "Object" and then add a line "if (t1 instanceof String && t2 instanceof String){result = (String)t1 + (String)t2" for each possible type. For example for adding integers: "if (t1 instanceof Integer && t2 instanceof Integer){result = (Integer)t1.intValue() + (Integer)t2.intValue()". (Maybe ".intValue()" is not needed with auto-in/outboxing, but I can't verify that at the moment)