Can I learn basic Java before Kotlin, or is that not necessary? If I learn Java will it be helpful for Kotlin?-阿里云开发者社区

开发者社区> 开发与运维> 正文
登录阅读全文

Can I learn basic Java before Kotlin, or is that not necessary? If I learn Java will it be helpful for Kotlin?

简介: Chanaka Fernando, knows Sinhala Answered Tue You don’t need Java knowledge to learn Kotlin or Kotlin knowledge to learn Java.

Chanaka Fernando, knows Sinhala
Answered Tue
You don’t need Java knowledge to learn Kotlin or Kotlin knowledge to learn Java. Having said that, If you know Java, that will be helpful when you need to interop with some Java libraries. You can start learning any of Java or Kotlin without prior knowledge of the other.


Ankit Singh, Technology Enthusiast, Blogger
Answered Tue
Kotlin resembles most of the construct as of Java. Having knowledge of Java atleast basics of it will help you in learning Kotlin.

If you start learning Kotlin directly it will take time to understand the language. As it uses various APIs that are in Java.

I would recommend you to go through basics of Java, before starting Kotlin. You don’t have to master Java.


Alexey Soshin, System Architect at Gett (2015-present)
Answered Tue
If you learn Java, it will help understand how Kotlin works better.

But it’s not mandatory to learn Java before Kotlin.

Kotlin is more modern and more pragmatic language. It simplifies a lot of stuff:

less boilerplate
null safety
type inference
generics


Ed Guenther, Using Java throughout my career; basically since the day Java 1.0 was released.
Answered Tue
Keep in mind that both languages run on the Java Virtual Machine. So a good amount of JVM related knowledge is a good thing to have.

Then Kotlin is designed to be fully inoperable with Java - so it also makes sense to know a bit about the Java language. And it often helps to look at some construct B in one language - to then think “hmm, in that other language, I would write that as B*”.

And finally: the true power of programming in Java is the plethora of standard and 3rd party libraries that you have access to. Having a bit of “overview” understand around that is important, too.

So, long story short: it definitely helps. Maybe not necessary, but (imho): very close to necessary.


版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。

分享:
开发与运维
使用钉钉扫一扫加入圈子
+ 订阅

集结各类场景实战经验,助你开发运维畅行无忧

其他文章