[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-4314":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":16,"stars30d":17,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":18,"rankGlobal":10,"rankLanguage":10,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":22,"hasPages":20,"topics":23,"createdAt":10,"pushedAt":10,"updatedAt":31,"readmeContent":32,"aiSummary":33,"trendingCount":16,"starSnapshotCount":16,"syncStatus":34,"lastSyncTime":35,"discoverSource":36},4314,"from-java-to-kotlin","amitshekhariitbhu\u002Ffrom-java-to-kotlin","amitshekhariitbhu","From Java To Kotlin - Your Cheat Sheet For Java To Kotlin","https:\u002F\u002Foutcomeschool.com",null,"Java",6325,783,185,5,0,3,64.98,"Apache License 2.0",false,"master",true,[24,25,26,27,28,29,30],"android","cheet-sheet","java","java-to-kotiln","kotlin","kotlin-android","kotlin-language","2026-06-12 04:00:22","\u003Cp align=\"center\">\n\u003Cimg alt=\"FromJavaToKotlin\" src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Famitshekhariitbhu\u002Ffrom-java-to-kotlin\u002Fmaster\u002Fassets\u002Ffrom_java_to_kotlin.png\">\n\u003C\u002Fp>\n\n# From Java To Kotlin\n\n> From Java To Kotlin - Your Cheat Sheet For Java To Kotlin\n\n## About me\n\nHi, I am Amit Shekhar, Founder @ [Outcome School](https:\u002F\u002Foutcomeschool.com) • IIT 2010-14 • I have taught and mentored many developers, and their efforts landed them high-paying tech jobs, helped many tech companies in solving their unique problems, and created many open-source libraries being used by top companies. I am passionate about sharing knowledge through open-source, blogs, and videos.\n\n### Follow Amit Shekhar\n\n- [X\u002FTwitter](https:\u002F\u002Ftwitter.com\u002Famitiitbhu)\n- [LinkedIn](https:\u002F\u002Fwww.linkedin.com\u002Fin\u002Famit-shekhar-iitbhu)\n- [GitHub](https:\u002F\u002Fgithub.com\u002Famitshekhariitbhu)\n\n### Follow Outcome School\n\n- [YouTube](https:\u002F\u002Fyoutube.com\u002F@OutcomeSchool)\n- [X\u002FTwitter](https:\u002F\u002Fx.com\u002Foutcome_school)\n- [LinkedIn](https:\u002F\u002Fwww.linkedin.com\u002Fcompany\u002Foutcomeschool)\n- [GitHub](http:\u002F\u002Fgithub.com\u002FOutcomeSchool)\n\n## I teach at Outcome School\n\n- AI and Machine Learning\n- Android\n\nJoin Outcome School and get a high-paying tech job: [Outcome School](https:\u002F\u002Foutcomeschool.com)\n\n## Live session on \"Android Developer Interview Preparation for Product-based Companies\"\n\nI conducted a live session on \"Android Developer Interview Preparation for Product-based Companies\"\n\nInteracted with over **500 Android Developers**.\n\nGuided, motivated, and inspired them to aim higher and achieve more.\n\n**Recording Link**: https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F1VWW3l_itH6vYbNYzNer6XW5_x0jzOF4O\u002Fview?usp=sharing\n\n**Document Link**: https:\u002F\u002Fdocs.google.com\u002Fdocument\u002Fd\u002F14UdD7Gd1j3no583ALx2t2Ggt3G_CECYhenLE-m-bkzA\u002Fedit?usp=sharing\n\n## Print to Console\n> Java\n\n```java\nSystem.out.print(\"Amit Shekhar\");\nSystem.out.println(\"Amit Shekhar\");\n```\n\n> Kotlin\n\n```kotlin\nprint(\"Amit Shekhar\")\nprintln(\"Amit Shekhar\")\n```\n\n---\n## Constants and Variables\n> Java\n\n```java\nString name = \"Amit Shekhar\";\nfinal String name = \"Amit Shekhar\";\n```\n\n> Kotlin\n\n```kotlin\nvar name = \"Amit Shekhar\"\nval name = \"Amit Shekhar\"\n```\n\n---\n## Assigning the null value\n> Java\n\n```java\nString otherName;\notherName = null;\n```\n\n> Kotlin\n\n```kotlin\nvar otherName : String?\notherName = null\n```\n\n---\n## Verify if value is null\n> Java\n\n```java\nif (text != null) {\n  int length = text.length();\n}\n```\n\n> Kotlin\n\n```kotlin\ntext?.let {\n    val length = text.length\n}\n\u002F\u002F or simply\nval length = text?.length\n```\n\n---\n## Verify if value is NotNull  OR NotEmpty\n> Java\n```java\nString sampleString = \"Shekhar\";\nif (!sampleString.isEmpty()) {\n    myTextView.setText(sampleString);\n}\nif(sampleString!=null && !sampleString.isEmpty()){\n    myTextView.setText(sampleString); \n}\n```\n> Kotlin\n\n```kotlin\nvar sampleString =\"Shekhar\"\nif(sampleString.isNotEmpty()){  \u002F\u002Fthe feature of kotlin extension function\n    myTextView.text=sampleString\n}\nif(!sampleString.isNullOrEmpty()){\n   myTextView.text=sampleString \n}\n```\n---\n## Concatenation of strings\n> Java\n\n```java\nString firstName = \"Amit\";\nString lastName = \"Shekhar\";\nString message = \"My name is: \" + firstName + \" \" + lastName;\n```\n\n> Kotlin\n\n```kotlin\nvar firstName = \"Amit\"\nvar lastName = \"Shekhar\"\nvar message = \"My name is: $firstName $lastName\"\n```\n\n---\n## New line in string\n> Java\n\n```java\nString text = \"First Line\\n\" +\n              \"Second Line\\n\" +\n              \"Third Line\";\n```\n\n> Kotlin\n\n```kotlin\nval text = \"\"\"\n        |First Line\n        |Second Line\n        |Third Line\n        \"\"\".trimMargin()\n```\n\n---\n\n## Substring\n> Java\n\n```java\nString str = \"Java to Kotlin Guide\";\nString substr = \"\";\n\n\u002F\u002Fprint java\nsubstr = str.substring(0, 4);\nSystem.out.println(\"substring = \" + substr);\n\n\u002F\u002Fprint kotlin\nsubstr = str.substring(8, 14);\nSystem.out.println(\"substring = \" + substr);\n```\n\n> Kotlin\n\n```kotlin\nvar str = \"Java to Kotlin Guide\"\nvar substr = \"\"\n\n\u002F\u002Fprint java\nsubstr = str.substring(0..3) \u002F\u002F\nprintln(\"substring $substr\")\n\n\u002F\u002Fprint kotlin\nsubstr = str.substring(8..13)\nprintln(\"substring $substr\")\n```\n\n---\n\n## Ternary Operations\n> Java\n\n```java\nString text = x > 5 ? \"x > 5\" : \"x \u003C= 5\";\n\nString message = null;\nlog(message != null ? message : \"\");\n```\n\n> Kotlin\n\n```kotlin\nval text = if (x > 5) \"x > 5\" else \"x \u003C= 5\"\n\nval message: String? = null\nlog(message ?: \"\")\n```\n\n---\n## Bitwise Operators\n> Java\n\n```java\nfinal int andResult  = a & b;\nfinal int orResult   = a | b;\nfinal int xorResult  = a ^ b;\nfinal int rightShift = a >> 2;\nfinal int leftShift  = a \u003C\u003C 2;\nfinal int unsignedRightShift = a >>> 2;\n```\n\n> Kotlin\n\n```kotlin\nval andResult  = a and b\nval orResult   = a or b\nval xorResult  = a xor b\nval rightShift = a shr 2\nval leftShift  = a shl 2\nval unsignedRightShift = a ushr 2\n```\n\n---\n## Check the type and casting\n> Java\n\n```java\nif (object instanceof Car) {\n  Car car = (Car) object;\n}\n```\n\n> Kotlin\n\n```kotlin\nif (object is Car) {\nvar car = object as Car\n}\n\n\u002F\u002F if object is null\nvar car = object as? Car \u002F\u002F var car = object as Car?\n```\n\n---\n## Check the type and casting (implicit)\n> Java\n\n```java\nif (object instanceof Car) {\n   Car car = (Car) object;\n}\n```\n\n> Kotlin\n\n```kotlin\nif (object is Car) {\n   var car = object \u002F\u002F smart casting\n}\n\n\u002F\u002F if object is null\nif (object is Car?) {\n   var car = object \u002F\u002F smart casting, car will be null\n}\n```\n\n---\n## Multiple conditions\n> Java\n\n```java\nif (score >= 0 && score \u003C= 300) { }\n```\n\n> Kotlin\n\n```kotlin\nif (score in 0..300) { }\n```\n\n---\n## Multiple Conditions (Switch case)\n> Java\n\n```java\nint score = \u002F\u002F some score;\nString grade;\nswitch (score) {\n  case 10:\n  case 9:\n    grade = \"Excellent\";\n    break;\n  case 8:\n  case 7:\n  case 6:\n    grade = \"Good\";\n    break;\n  case 5:\n  case 4:\n    grade = \"OK\";\n    break;\n  case 3:\n  case 2:\n  case 1:\n    grade = \"Fail\";\n    break;\n  default:\n      grade = \"Fail\";       \n}\n```\n\n> Kotlin\n\n```kotlin\nvar score = \u002F\u002F some score\nvar grade = when (score) {\n  9, 10 -> \"Excellent\"\n  in 6..8 -> \"Good\"\n  4, 5 -> \"OK\"\n  else -> \"Fail\"\n}\n```\n\n---\n## For-loops\n> Java\n\n```java\nfor (int i = 1; i \u003C= 10 ; i++) { }\n\nfor (int i = 1; i \u003C 10 ; i++) { }\n\nfor (int i = 10; i >= 0 ; i--) { }\n\nfor (int i = 1; i \u003C= 10 ; i+=2) { }\n\nfor (int i = 10; i >= 0 ; i-=2) { }\n\nfor (String item : collection) { }\n\nfor (Map.Entry\u003CString, String> entry: map.entrySet()) { }\n```\n\n> Kotlin\n\n```kotlin\nfor (i in 1..10) { }\n\nfor (i in 1 until 10) { }\n\nfor (i in 10 downTo 0) { }\n\nfor (i in 1..10 step 2) { }\n\nfor (i in 10 downTo 0 step 2) { }\n\nfor (item in collection) { }\n\nfor ((key, value) in map) { }\n```\n\n---\n## Collections\n> Java\n\n```java\nfinal List\u003CInteger> listOfNumber = Arrays.asList(1, 2, 3, 4);\n\nfinal Map\u003CInteger, String> keyValue = new HashMap\u003CInteger, String>();\nmap.put(1, \"Amit\");\nmap.put(2, \"Anand\");\nmap.put(3, \"Messi\");\n\n\u002F\u002F Java 9\nfinal List\u003CInteger> listOfNumber = List.of(1, 2, 3, 4);\n\nfinal Map\u003CInteger, String> keyValue = Map.of(1, \"Amit\",\n                                             2, \"Anand\",\n                                             3, \"Messi\");\n```\n\n> Kotlin\n\n```kotlin\nval listOfNumber = listOf(1, 2, 3, 4)\nval keyValue = mapOf(1 to \"Amit\",\n                     2 to \"Anand\",\n                     3 to \"Messi\")\n```\n\n---\n## for each\n> Java\n\n```java\n\u002F\u002F Java 7 and below\nfor (Car car : cars) {\n  System.out.println(car.speed);\n}\n\n\u002F\u002F Java 8+\ncars.forEach(car -> System.out.println(car.speed));\n\n\u002F\u002F Java 7 and below\nfor (Car car : cars) {\n  if (car.speed > 100) {\n    System.out.println(car.speed);\n  }\n}\n\n\u002F\u002F Java 8+\ncars.stream().filter(car -> car.speed > 100).forEach(car -> System.out.println(car.speed));\ncars.parallelStream().filter(car -> car.speed > 100).forEach(car -> System.out.println(car.speed));\n```\n\n> Kotlin\n\n```kotlin\ncars.forEach {\n    println(it.speed)\n}\n\ncars.filter { it.speed > 100 }\n      .forEach { println(it.speed)}\n\n\u002F\u002F kotlin 1.1+\ncars.stream().filter { it.speed > 100 }.forEach { println(it.speed)}\ncars.parallelStream().filter { it.speed > 100 }.forEach { println(it.speed)}\n```\n\n---\n## Splitting arrays\n> java\n\n```java\nString[] splits = \"param=car\".split(\"=\");\nString param = splits[0];\nString value = splits[1];\n```\n\n\n> kotlin\n\n```kotlin\nval (param, value) = \"param=car\".split(\"=\")\n```\n\n---\n## Defining methods\n> Java\n\n```java\nvoid doSomething() {\n   \u002F\u002F logic here\n}\n```\n\n> Kotlin\n\n```kotlin\nfun doSomething() {\n   \u002F\u002F logic here\n}\n```\n\n### Default values for method parameters\n> Java\n\n```java\ndouble calculateCost(int quantity, double pricePerItem) {\n    return pricePerItem * quantity;\n}\n\ndouble calculateCost(int quantity) {\n    \u002F\u002F default price is 20.5\n    return 20.5 * quantity;\n}\n```\n\n> Kotlin\n\n```kotlin\nfun calculateCost(quantity: Int, pricePerItem: Double = 20.5) = quantity * pricePerItem\n\ncalculateCost(10, 25.0) \u002F\u002F 250\ncalculateCost(10) \u002F\u002F 205\n\n```\n\n---\n## Variable number of arguments\n> Java\n\n```java\nvoid doSomething(int... numbers) {\n   \u002F\u002F logic here\n}\n```\n\n> Kotlin\n\n```kotlin\nfun doSomething(vararg numbers: Int) {\n   \u002F\u002F logic here\n}\n```\n\n---\n## Defining methods with return\n> Java\n\n```java\nint getScore() {\n   \u002F\u002F logic here\n   return score;\n}\n```\n\n> Kotlin\n\n```kotlin\nfun getScore(): Int {\n   \u002F\u002F logic here\n   return score\n}\n\n\u002F\u002F as a single-expression function\n\nfun getScore(): Int = score\n\n\u002F\u002F even simpler (type will be determined automatically)\n\nfun getScore() = score \u002F\u002F return-type is Int\n```\n\n---\n## Returning result of an operation\n> Java\n\n```java\nint getScore(int value) {\n    \u002F\u002F logic here\n    return 2 * value;\n}\n```\n\n> Kotlin\n\n```kotlin\nfun getScore(value: Int): Int {\n   \u002F\u002F logic here\n   return 2 * value\n}\n\n\u002F\u002F as a single-expression function\nfun getScore(value: Int): Int = 2 * value\n\n\u002F\u002F even simpler (type will be determined automatically)\n\nfun getScore(value: Int) = 2 * value \u002F\u002F return-type is int\n```\n\n---\n## Constructors\n> Java\n\n```java\npublic class Utils {\n\n    private Utils() {\n      \u002F\u002F This utility class is not publicly instantiable\n    }\n\n    public static int getScore(int value) {\n        return 2 * value;\n    }\n\n}\n```\n\n> Kotlin\n\n```kotlin\nclass Utils private constructor() {\n\n    companion object {\n\n        fun getScore(value: Int): Int {\n            return 2 * value\n        }\n\n    }\n}\n\n\u002F\u002F another way\n\nobject Utils {\n\n    fun getScore(value: Int): Int {\n        return 2 * value\n    }\n\n}\n```\n\n---\n## Getters and Setters\n> Java\n\n```java\npublic class Developer {\n\n    private String name;\n    private int age;\n\n    public Developer(String name, int age) {\n        this.name = name;\n        this.age = age;\n    }\n\n    public String getName() {\n        return name;\n    }\n\n    public void setName(String name) {\n        this.name = name;\n    }\n\n    public int getAge() {\n        return age;\n    }\n\n    public void setAge(int age) {\n        this.age = age;\n    }\n\n    @Override\n    public boolean equals(Object o) {\n        if (this == o) return true;\n        if (o == null || getClass() != o.getClass()) return false;\n\n        Developer developer = (Developer) o;\n\n        if (age != developer.age) return false;\n        return name != null ? name.equals(developer.name) : developer.name == null;\n\n    }\n\n    @Override\n    public int hashCode() {\n        int result = name != null ? name.hashCode() : 0;\n        result = 31 * result + age;\n        return result;\n    }\n\n    @Override\n    public String toString() {\n        return \"Developer{\" +\n                \"name='\" + name + '\\'' +\n                \", age=\" + age +\n                '}';\n    }\n}\n```\n\n> Kotlin\n\n```kotlin\ndata class Developer(var name: String, var age: Int)\n\n```\n\n---\n## Cloning or copying\n> Java\n\n```java\npublic class Developer implements Cloneable {\n\n    private String name;\n    private int age;\n\n    public Developer(String name, int age) {\n        this.name = name;\n        this.age = age;\n    }\n\n    @Override\n    protected Object clone() throws CloneNotSupportedException {\n        return (Developer)super.clone();\n    }\n}\n\n\u002F\u002F cloning or copying\nDeveloper dev = new Developer(\"Messi\", 30);\ntry {\n    Developer dev2 = (Developer) dev.clone();\n} catch (CloneNotSupportedException e) {\n    \u002F\u002F handle exception\n}\n\n```\n\n> Kotlin\n\n```kotlin\ndata class Developer(var name: String, var age: Int)\n\n\u002F\u002F cloning or copying\nval dev = Developer(\"Messi\", 30)\nval dev2 = dev.copy()\n\u002F\u002F in case you only want to copy selected properties\nval dev2 = dev.copy(age = 25)\n\n```\n\n---\n## Generics\n> Java\n\n```java\n\n\u002F\u002F Example #1\ninterface SomeInterface\u003CT> {\n    void doSomething(T data);\n}\n\nclass SomeClass implements SomeInterface\u003CString> {\n    @Override\n    public void doSomething(String data) {\n        \u002F\u002F some logic\n    }\n}\n\n\u002F\u002F Example #2\ninterface SomeInterface\u003CT extends Collection\u003C?>> {\n    void doSomething(T data);\n}\n\nclass SomeClass implements SomeInterface\u003CList\u003CString>> {\n\n    @Override\n    public void doSomething(List\u003CString> data) {\n        \u002F\u002F some logic\n    }\n}\n\n```\n\n> Kotlin\n\n```kotlin\ninterface SomeInterface\u003CT> {\n    fun doSomething(data: T)\n}\n\nclass SomeClass: SomeInterface\u003CString> {\n    override fun doSomething(data: String) {\n        \u002F\u002F some logic\n    }\n}\n\ninterface SomeInterface\u003CT: Collection\u003C*>> {\n    fun doSomething(data: T)\n}\n\nclass SomeClass: SomeInterface\u003CList\u003CString>> {\n    override fun doSomething(data: List\u003CString>) {\n        \u002F\u002F some logic\n    }\n}\n```\n\n---\n## Extension function\n> Java\n\n```java\npublic class Utils {\n\n    private Utils() {\n      \u002F\u002F This utility class is not publicly instantiable\n    }\n\n    public static int triple(int value) {\n        return 3 * value;\n    }\n\n}\n\nint result = Utils.triple(3);\n\n```\n\n> Kotlin\n\n```kotlin\nfun Int.triple(): Int {\n  return this * 3\n}\n\nvar result = 3.triple()\n```\n\n---\n## Defining uninitialized objects\n> Java\n\n```java\nPerson person;\n```\n\n> Kotlin\n\n```kotlin\ninternal lateinit var person: Person\n```\n---\n## enum\n> Java\n\n```java\npublic enum Direction {\n        NORTH(1),\n        SOUTH(2),\n        WEST(3),\n        EAST(4);\n\n        int direction;\n\n        Direction(int direction) {\n            this.direction = direction;\n        }\n\n        public int getDirection() {\n            return direction;\n        }\n    }\n```\n> Kotlin\n\n```kotlin\nenum class Direction(val direction: Int) {\n    NORTH(1),\n    SOUTH(2),\n    WEST(3),\n    EAST(4);\n}\n```\n---\n\n\n## Sorting List\n> Java\n\n```java\nList\u003CProfile> profiles = loadProfiles(context);\nCollections.sort(profiles, new Comparator\u003CProfile>() {\n    @Override\n    public int compare(Profile profile1, Profile profile2) {\n        if (profile1.getAge() > profile2.getAge()) return 1;\n        if (profile1.getAge() \u003C profile2.getAge()) return -1;\n        return 0;\n    }\n});\n\n```\n\n> Kotlin\n\n```kotlin\nval profile = loadProfiles(context)\nprofile.sortedWith(Comparator({ profile1, profile2 ->\n    if (profile1.age > profile2.age) return@Comparator 1\n    if (profile1.age \u003C profile2.age) return@Comparator -1\n    return@Comparator 0\n}))\n```\n---\n\n## Anonymous Class\n> Java\n\n```java\n AsyncTask\u003CVoid, Void, Profile> task = new AsyncTask\u003CVoid, Void, Profile>() {\n    @Override\n    protected Profile doInBackground(Void... voids) {\n        \u002F\u002F fetch profile from API or DB\n        return null;\n    }\n\n    @Override\n    protected void onPreExecute() {\n        super.onPreExecute();\n        \u002F\u002F do something\n    }\n};\n\n```\n\n> Kotlin\n\n```kotlin\nval task = object : AsyncTask\u003CVoid, Void, Profile>() {\n    override fun doInBackground(vararg voids: Void): Profile? {\n        \u002F\u002F fetch profile from API or DB\n        return null\n    }\n\n    override fun onPreExecute() {\n        super.onPreExecute()\n        \u002F\u002F do something\n    }\n}\n```\n---\n## Initialization block\n> Java\n\n```java\npublic class User {\n    {  \u002F\u002FInitialization block\n        System.out.println(\"Init block\");\n    }\n}\n\n```\n\n> Kotlin\n\n```kotlin\n   class User {\n        init { \u002F\u002F Initialization block\n            println(\"Init block\")\n        }\n    }\n```\n\n---\n\n### Important things to know in Kotlin\n\n- [Mastering Kotlin Coroutines](https:\u002F\u002Foutcomeschool.com\u002Fblog\u002Fkotlin-coroutines) - Mastering Kotlin Coroutines\n- [Dispatchers in Kotlin Coroutines](https:\u002F\u002Foutcomeschool.com\u002Fblog\u002Fdispatchers-in-kotlin-coroutines) - Dispatchers in Kotlin Coroutines\n- [coroutineScope vs supervisorScope](https:\u002F\u002Foutcomeschool.com\u002Fblog\u002Fcoroutinescope-vs-supervisorscope) - coroutineScope vs supervisorScope\n- [CoroutineContext in Kotlin](https:\u002F\u002Foutcomeschool.com\u002Fblog\u002Fcoroutinecontext-in-kotlin) - CoroutineContext in Kotlin\n- [What is Flow API in Kotlin?](https:\u002F\u002Foutcomeschool.com\u002Fblog\u002Fflow-api-in-kotlin) - What is Flow API in Kotlin?\n- [Long-running tasks in parallel with Kotlin Flow](https:\u002F\u002Foutcomeschool.com\u002Fblog\u002Flong-running-tasks-in-parallel-with-kotlin-flow) - Long-running tasks in parallel with Kotlin Flow\n- [Retry Operator in Kotlin Flow](https:\u002F\u002Foutcomeschool.com\u002Fblog\u002Fretry-operator-in-kotlin-flow) - Retry Operator in Kotlin Flow\n- [Callback to Coroutines in Kotlin](https:\u002F\u002Foutcomeschool.com\u002Fblog\u002Fcallback-to-coroutines-in-kotlin) - Callback to Coroutines in Kotlin\n- [Retrofit with Kotlin Flow](https:\u002F\u002Foutcomeschool.com\u002Fblog\u002Fretrofit-with-kotlin-flow) - Retrofit with Kotlin Flow\n- [Room Database with Kotlin Flow](https:\u002F\u002Foutcomeschool.com\u002Fblog\u002Froom-database-with-kotlin-flow) - Room Database with Kotlin Flow\n- [Remove duplicates from an array](https:\u002F\u002Foutcomeschool.com\u002Fblog\u002Fremove-duplicates-from-an-array-in-kotlin) - Remove duplicates from an array in Kotlin\n- [JvmStatic Annotation in Kotlin](https:\u002F\u002Foutcomeschool.com\u002Fblog\u002Fjvmstatic-annotation-in-kotlin) - JvmStatic Annotation in Kotlin\n- [JvmOverloads Annotation in Kotlin](https:\u002F\u002Foutcomeschool.com\u002Fblog\u002Fjvmoverloads-annotation-in-kotlin) - JvmOverloads Annotation in Kotlin\n- [JvmField Annotation in Kotlin](https:\u002F\u002Foutcomeschool.com\u002Fblog\u002Fjvmfield-annotation-in-kotlin) - JvmField Annotation in Kotlin\n- [inline function in Kotlin](https:\u002F\u002Foutcomeschool.com\u002Fblog\u002Finline-function-in-kotlin) - inline function in Kotlin\n- [noinline in Kotlin](https:\u002F\u002Foutcomeschool.com\u002Fblog\u002Fnoinline-in-kotlin) - noinline in Kotlin\n- [crossinline in Kotlin](https:\u002F\u002Foutcomeschool.com\u002Fblog\u002Fcrossinline-in-kotlin) - crossinline in Kotlin\n- [lateinit vs lazy in Kotlin](https:\u002F\u002Foutcomeschool.com\u002Fblog\u002Flateinit-vs-lazy-in-kotlin) - lateinit vs lazy in Kotlin\n- [init block in Kotlin](https:\u002F\u002Foutcomeschool.com\u002Fblog\u002Finit-block-in-kotlin) - init block in Kotlin\n- [Retrofit with Kotlin Coroutines](https:\u002F\u002Foutcomeschool.com\u002Fblog\u002Fretrofit-with-kotlin-coroutines) - Retrofit with Kotlin Coroutines\n- [Advantage of using const in Kotlin](https:\u002F\u002Foutcomeschool.com\u002Fblog\u002Fconst-in-kotlin) - Advantage of using const in Kotlin\n- [AssociateBy - List to Map in Kotlin](https:\u002F\u002Foutcomeschool.com\u002Fblog\u002Fassociateby-list-to-map-in-kotlin) - Kotlin Collection Functions - associateBy that converts a list into a map\n- [partition - filtering function in Kotlin](https:\u002F\u002Foutcomeschool.com\u002Fblog\u002Fpartition-filtering-function-in-kotlin) - partition - filtering function in Kotlin\n- [Infix notation in Kotlin](https:\u002F\u002Foutcomeschool.com\u002Fblog\u002Finfix-notation-in-kotlin) - Infix notation in Kotlin\n- [Open keyword in Kotlin](https:\u002F\u002Foutcomeschool.com\u002Fblog\u002Fopen-keyword-in-kotlin) - Open keyword in Kotlin\n- [Companion object in Kotlin](https:\u002F\u002Foutcomeschool.com\u002Fblog\u002Fcompanion-object-in-kotlin) - Companion object in Kotlin\n- [Extension function in Kotlin](https:\u002F\u002Foutcomeschool.com\u002Fblog\u002Fextension-function-in-kotlin) - Extension function in Kotlin\n- [data class in Kotlin](https:\u002F\u002Foutcomeschool.com\u002Fblog\u002Fdata-class-in-kotlin) - data class in Kotlin\n- [How does the Kotlin Multiplatform work?](https:\u002F\u002Foutcomeschool.com\u002Fblog\u002Fhow-does-the-kotlin-multiplatform-work) - How does the Kotlin Multiplatform work?\n\n## Join **Outcome School** and get high paying tech job: [Outcome School](https:\u002F\u002Foutcomeschool.com)\n\n### Found this project useful :heart:\n* Support by clicking the :star: button on the upper right of this page. :v:\n\n### License\n```\n   Copyright (C) 2024 Amit Shekhar\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http:\u002F\u002Fwww.apache.org\u002Flicenses\u002FLICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n```\n\n### Contributing to From Java To Kotlin\nJust make a pull request. You are in!\n","该项目是从Java到Kotlin的转换指南，为开发者提供了一份详尽的对照表。核心功能包括展示Java与Kotlin在语法和特性上的差异，例如变量声明、空值处理及字符串操作等，帮助开发者快速上手Kotlin编程。技术特点体现在简洁明了地对比了两种语言的关键概念，并通过实际代码示例加深理解。适用于希望从Java迁移到Kotlin的Android开发者或任何对学习Kotlin感兴趣的程序员，在日常开发中作为参考工具使用。",2,"2026-06-11 02:59:37","top_language"]