I want to learn programming in Kotlin. Should I learn Java first?

kotlin · · 48 次点击    
<p>Hello!</p> <p>So I&#39;m trying to learn Kotlin. I have a general idea for an app and I&#39;m trying to solve problems step by step to make it work. </p> <p>Unfortunatly Kotlin seems to be relatively new compared to Java and there is a lot less resources available and so I&#39;m having a problem of finding solutions to my problems. </p> <p>So I was thinking since there is a lot more information and tutorials for Java maybe I should learn Java first?</p> <p>Or maybe I should learn both Java and Kotlin at the same time? For example I would make my app/code in Java first and then I could try to convert it to Kotlin. It would be much slower to learn (maybe) but knowing both Java and Kotlin could be very beneficial. </p> <p>What do you think? </p> <hr/>**评论:**<br/><br/>vladmir_zeus1: <pre><p>Go with <code>Java</code> first. <code>Kotlin</code> fixes a lot of <code>Java</code> flaws and provides many <code>Java</code> -compatible solutions to those. Without knowing the flaws, you probably would have a hard time understanding the solutions. Also, since 99% of online examples on the beginner side will be in <code>Java</code> and learning two language on top of Android will be a lot. However, there is no need to master <code>Java</code> before you begin learning <code>Kotlin</code>, but currently being able to convert between the two is still a requirement for effective development. <code>Kotlin</code> simply makes your life easier as a <code>Java</code> developer.</p></pre>CodyEngel: <pre><p>I feel like that&#39;s similar to saying &#34;Before you learn Java you have to learn C, and before you learn C you have to learn Assembly&#34;.</p> <p>Java will probably be easier to learn because everything is fairly explicit, however I wouldn&#39;t learn Java first just to understand why Kotlin was built the way it was.</p></pre>kite_n_code: <pre><p>Learn java first. Most learning resources are written in java. Java is actually easy to learn the basics and enjoyable imo. Android studio makes it fast to write and debug. I&#39;m about 6 months ahead of you. Coming from iOS swift and web development. I initially started learning android using kotlin but spent a lot of time translating java to kotlin. I then rewrote the app in java which was easier then I anticipated. You can easily integrate kotlin in your java project if you choose at any stage.</p></pre>brokenbyclouds: <pre><p>I had no experience with Java when I started to learn Kotlin. In my experience, most resources for learning Kotlin spend a lot of time comparing/contrasting Kotlin with Java to the point that you almost have no choice but to learn at least a little Java.</p> <p>You&#39;ll pick it up as you go, I wouldn&#39;t go out of your way to learn Java before Kotlin. </p></pre>dimitar_: <pre><p>I would say that it&#39;s a good idea to learn Java too, but you can focus on Kotlin. Even if you are not going to code in Java, there is a great chance that you will use some Java libraries and it&#39;s very good to understand their code. </p></pre>JackRutorial: <pre><p>Yes, you learn java first, and you should learn through short examples, short tutorial.</p></pre>hanpari: <pre><p>I spent two weeks with Java and then switched to Kotlin happily. But need to say I dont consider myself a beginner.</p></pre>sbondai: <pre><p>I will just echo what has been said already lol. I think you can learn Kotlin without learning Java (a big BUT). Unfortunately Kotlin is still taking off, there are few materials to learn it and these tutorials are based on flaws of Java you might find yourself frustrated and eventually learn Java. But if you have a background of strong object oriented programming then you are good. Kotlin is pretty neat if you can read Java tutorial and translate it to Kotlin you will learn a lot. Goodluck DNT GIVE UP ;)</p></pre>sheatrevor: <pre><p>You don’t have to know Java before jumping into Kotlin.</p> <p>The individuals that are suggesting that you do likely feel that knowing Java made learning Kotlin easier for them. I have no doubt that is true - just like spoken languages, each language you learn makes learning the next a little easier.</p> <p>The challenge you’ll have is that if you are using the JVM a lot of the libraries you’ll find yourself wanting to use are written in Java and will provide Java-centric documentation and examples.</p> <p>In order to understand examples or source code written in Java, you’ll find yourself learning some Java. At some point you may decide to do a deep-dive on Java to expand your knowledge of it, but you don’t have to start with Java first.</p></pre>cathray: <pre><p>I daresay start with Kotlin and ignore Java as much as possible. If you start with Java it will fuck up your idea of programming. You should not start on Java until you have a clear understanding of what good code looks like.</p></pre>sonofasinewave: <pre><p>Here is a rather comprehensive (86 videos) playlist on &#34;Kotlin for Java Developers&#34;. I am working through it so I can figure out what @JakeWharton is talking about in some of his presentations. It is the only video series I have found that goes from basics to advanced Kotlin patterns in a rational way. And yes you have to learn both languages, but I find Kotlin to be more fun. Link: <a href="https://www.youtube.com/playlist?list=PL_RzKMPCc5z5qdsXMtynMDzpwDazNi7pS" rel="nofollow">https://www.youtube.com/playlist?list=PL_RzKMPCc5z5qdsXMtynMDzpwDazNi7pS</a></p></pre>
48 次点击  
加入收藏 微博
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet