How can I declare a method signature that takes Long
, Integer
as input?
I tried following but it gives a compilation error:
List<Myobject> fun ( ? extends Number) value){ //impl }
Answer
public <N extends Number>List<T> xx(N a) {...}
Online Free Tutorials Guruji Guide & Materials – Solved Questions Answers
How can I declare a method signature that takes Long
, Integer
as input?
I tried following but it gives a compilation error:
List<Myobject> fun ( ? extends Number) value){ //impl }
public <N extends Number>List<T> xx(N a) {...}