0

is there a generic variabels in solo learn(java)

if there is can someone explain to me how to use it

27th Mar 2019, 4:12 AM
yochay zamir
yochay zamir - avatar
2 Respostas
+ 17
Generic function is very useful if you do not know what the user is going to do, you can use generic function or generic class. Examp : if user enter a Integer number Than generic funtion or class automatically convert a generic parameter to this type. Syntax : for classes class <T> // here T repersant as generic type parameter you can use any alphabat you want. For function public void fun(T a) Here T repersant generuc Type and a automatically converts to that type.
28th Mar 2019, 8:43 PM
Sumit Programmer😎😎
Sumit Programmer😎😎 - avatar
0
Tnx this is helpfull
28th Mar 2019, 8:59 PM
yochay zamir
yochay zamir - avatar