| Java type | Kotlin type |
|---|---|
| byte | kotlin.Byte |
| short | kotlin.Short |
| int | kotlin.Int |
| long | kotlin.Long |
| char | kotlin.Char |
| float | kotlin.Float |
| double | kotlin.Double |
| boolean | kotlin.Boolean |
| Java type | Kotlin type |
|---|---|
| java.lang.Object | kotlin.Any! |
| java.lang.Cloneable | kotlin.Cloneable! |
| java.lang.Comparable | kotlin.Comparable! |
| java.lang.Enum | kotlin.Enum! |
| java.lang.Annotation | kotlin.Annotation! |
| java.lang.Deprecated | kotlin.Deprecated! |
| java.lang.CharSequence | kotlin.CharSequence! |
| java.lang.String | kotlin.String! |
| java.lang.Number | kotlin.Number! |
| java.lang.Throwable | kotlin.Throwable! |
| Java type | Kotlin type |
|---|---|
| java.lang.Byte | kotlin.Byte? |
| java.lang.Short | kotlin.Short? |
| java.lang.Integer | kotlin.Int? |
| java.lang.Long | kotlin.Long? |
| java.lang.Char | kotlin.Char? |
| java.lang.Float | kotlin.Float? |
| java.lang.Double | kotlin.Double? |
| java.lang.Boolean | kotlin.Boolean? |
| Java type | Kotlin read-only type | Kotlin mutable type | Loaded platform type |
|---|---|---|---|
| Iterator | Iterator | MutableIterator | (Mutable)Iterator! |
| Iterable | Iterable | MutableIterable | (Mutable)Iterable! |
| Collection | Collection | MutableCollection | (Mutable)Collection! |
| Set | Set | MutableSet | (Mutable)Set! |
| List | List | MutableList | (Mutable)List! |
| ListIterator | ListIterator | MutableListIterator | (Mutable)ListIterator! |
| Map | Map | MutableMap | (Mutable)Map! |
| Map.Entry | Map.Entry | MutableMap.MutableEntry | (Mutable)Map.(Mutable)Entry! |
| Java type | Kotlin type |
|---|---|
| int[] | kotlin.IntArray! |
| String[] | kotlin.Array<(out) String>! |
联系作者
请使用QQ扫码加群, 小伙伴们在等着你哦!