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

本文探讨了在没有Java背景的情况下直接学习Kotlin的可能性。多位专家指出,虽然不是必需,但具备基本的Java知识有助于更好地理解Kotlin,尤其是在使用Java API和库时。文章建议初学者至少了解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.


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值