Created
October 12, 2020 13:40
-
-
Save ch8n/a76ba87e89bb864f5b6d4725b180f3bb to your computer and use it in GitHub Desktop.
map to linkedHashmap in kotlin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Directly use the 4th constructor example | |
val contact = mapOf("chetan" to "[email protected]") | |
val linkedMapOfContact = LinkedHashMap(contact) | |
// Or create and add all entries | |
val linkedMapOfContact = LinkedHashMap<String,Int>() | |
linkedMapOfContact.putAll(contact) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment