https://kotlinlang.org logo
#android
Title
# android
r

Robby

10/01/2020, 1:52 PM
okay thank you But when i generate data Class then can we set any Double or Integer as Number?
v

Vampire

10/01/2020, 1:55 PM
Sure,
Number
is superclass of both,
Double
and
Int
(as well as
Long
,
Short
,
Float
and
Byte
). So if you have a
Number
typed variable, you can assign any number to it.
r

Robby

10/01/2020, 3:21 PM
oh, yes it is Help full me thank you @Vampire sir