<#C0B8MA7FA|getting-started> Hi All, Does anyone ...
# getting-started
s
#getting-started Hi All, Does anyone tell me the difference between Kotlin data types and Java data types? As, I am learning about Kotlin data types and I found that in case of Kotlin Data Type we can directly use method like minus, divide etc. directly without using Wrapper Classes as we use in case of Java.
n
you can use minus/divide/operators with any class in Kotlin provided it defines the method (with
operator
keyword) or an extension method, not just data classes
oh, you're talking about data types, not data classes
https://kotlinlang.org/docs/basic-types.html#numbers-representation-on-the-jvm I think this might cover it. basically it boxes automatically, e.g. Int is unboxed when used as a local var, but boxed when used in a Map (e.g. Map<Int, Int>) or as a nullable type (Int?)