Can I changing java code to kotlin code? Or each programming language code to an other programming language | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Can I changing java code to kotlin code? Or each programming language code to an other programming language

27th Mar 2020, 9:46 AM
master.cpp
10 Answers
+ 1
I know both them But recently I creat my app by kotlin I can't write again my old java code to kotlin code How I can do it?
27th Mar 2020, 10:29 AM
master.cpp
+ 1
Where I can find converting in android studio?
27th Mar 2020, 10:34 AM
master.cpp
+ 1
‎احمد With Android studio, write java code and by converting options, you can get converted equalent kotlin code.. Edit: See this link. https://stackoverflow.com/questions/34588117/how-can-i-convert-a-part-of-java-source-file-to-kotlin https://www.jetbrains.com/help/idea/mixing-java-and-kotlin-in-one-project.html
27th Mar 2020, 10:35 AM
Jayakrishna 🇮🇳
+ 1
Thank you a lot🌹
27th Mar 2020, 10:41 AM
master.cpp
28th Mar 2020, 6:04 PM
@DENGINEERING
@DENGINEERING - avatar
+ 1
Why you send this?
28th Mar 2020, 6:22 PM
master.cpp
0
No because each programming language has their own syntax.So you cant copy the java program and run on kotlin and vice versa.
27th Mar 2020, 9:51 AM
Souptik Nath
Souptik Nath - avatar
0
According to my knowledge, some language supports running other language code via some native methods... C code can run on c++, Java can be run on python by jpython, R can can run on python, java have supported, and supports most programs.. Kotlin is introduced as to provide alternatives which have difficulties in java. So most programs write in java can be supported to run on kotlin.. Infact I think it easy by some IDE...
27th Mar 2020, 10:10 AM
Jayakrishna 🇮🇳
0
No I mean this For example In kotlin I write Var num : Int = 4 And in java I write Int num = 4; Can I convert java code to kotlin code?
27th Mar 2020, 10:18 AM
master.cpp
0
Yes but you should know the syntax of both java and kotlin.
27th Mar 2020, 10:20 AM
Souptik Nath
Souptik Nath - avatar