I'm trying to compile this Java code but compiler says : "./Playground/Program.java uses or ovveride Deprecated APIs". why it's not complies? π€ https://code.sololearn.com/cLJy1LwBIqNh/?ref=app
7/24/2020 4:19:20 AM
Shahghasi Adil π π¦π«12 Answers
New AnswerS.Adil π¦π« you are doing unnecessary boxing "new Integer(10)"'. you can simply pass the value. https://code.sololearn.com/ci49N3Eme9jl/?ref=app
Kevin β it's just System.out.println(" Compiled" ); ππ why bounded types not working? π€
PβWAN MβURYβ I passed Integer type I know String occurring error but in Integer type code Playground showing Deprecated warnings π
PβWAN MβURYβ is Generics not accepting wrapper class values? π€
BroFar PβWAN MβURYβ MiKoLaπ₯3L17.4L16.2.5k=>L18.πIDLE π€π€π€
Hey S.Adil π¦π« . Bounded type will not work because you are passing the string object. And String class not extended the Number class. If you use bouded type parameter. Make sure your passed argument extended the Bounded parameter.
It has nothing to do with bounded type parameters. https://code.sololearn.com/cGWDdd5j7VtR/?ref=app
S.Adil π¦π« https://stackoverflow.com/questions/49904830/create-a-new-integer-object-that-holds-the-value-1 They can but you are wrapping the wrong way. new Integer() seems to be deprecated.
Sololearn Inc.
535 Mission Street, Suite 1591Send us a message