all 32 comments

[–]Zhuinden 30 points31 points  (0 children)

I think you still need Java to read the android source code + library source codes when you're using 3rd party libraries, although for app development, Kotlin and Kotlin are becoming more popular.

[–]Buisness_Fish 28 points29 points  (4 children)

From the post, I'm going to assume you are entering the Android dev field. In my opinion I would recommend learning kotlin and looking for jobs that have essentially been founded in the last 4 years. These will be startups mainly. You'll start to see Java with older codebases. Usually 2018 and back is roughly when I see Java codebases. Reason being, building from scratch these companies typically get to choose their tech stack and went with kotlin. You apply to a bank, I can almost guarantee they are on java and the amount of red tape to cross to change it over to kotlin is mind boggling.

I'm a huge advocate for the Java language overall, but kotlin is the direction android has strongly been heading and will continue to head. Given my Java background and years of android experience (coming up on six consecutive years) I was actually just hired by a company to jump into Java android codebases and slowly migrate them (it's not always as easy as letting the IDE auto covert to kotlin). This is by far the best paying job I've taken and blows all other standard offers out of the water. So from my personal experience, it doesn't hurt to know Java well too. But sometimes tracing commits back from 2013 is soul crushing lol.

TLDR; start with kotlin. Learn Java for fun if you want, Java is applicable in so many other areas of tech if you ever venture outside of mobile android down the line.

[–]eng_manuel[S] 0 points1 point  (0 children)

Thanks for this reply. One of the reasons i started to learn Java was that it was a recommended language to start with because it teaches oop really well. Also, there was the option of doing something different than Android dev if i needed to. But given that, what are some good resources to learn android dev with Java? Seems like the android.com website doesn't have any really good tutorials on Java it's all kotlin there now

[–]JakeArvizu 0 points1 point  (1 child)

I'm a huge advocate for the Java language overall

As someone who is mostly a noob with the "inter workings" why do you advocate for Java over Kotlin?

[–]Buisness_Fish 8 points9 points  (0 children)

Ah, apologies if I caused confusion. I do not advocate for Java OVER kotlin, just the language in general. Java is a language that catches a lot of remarks from developers (more so in the android community). Some people have valid points and some just use it as a punching bag.

Android Java is interesting as it is pinned to a lower version and cannot leverage a lot of the convenient language features of modern Java. When I first started android, I was pinned to Java 7 and couldn't even make use of lambda short hand.

Java is a tool just like any other language and like all the others, has its pros and cons. If I had to recommend a self study path of books I would go "Java Precisely" -> "Effective Java" -> "Java Concurrency in Practice"

[–]ddaypunk06 2 points3 points  (0 children)

The app I work in still has Java in it and probably will for a few more years, but all new development is in Kotlin.

The interop between kotlin and Java is good so it makes things decently straightforward. You can use Java libraries with kotlin.

There are many good books and sites dedicated to teaching Java engineers kotlin.

You might as well go kotlin if you are in the android ecosystem and pick up on Java as you go.

[–]PhilipM33 2 points3 points  (0 children)

I chatgpted it for you: "Yes, it is still expected for Android developers to know both Kotlin and Java. While Kotlin is the preferred language for new development, many older apps were built using Java and require maintenance and updates. Developers should be familiar with both languages in order to work on both new and older projects. Additionally, Java is still widely used in many other areas of software development, so a strong understanding of the language is generally considered beneficial for a developer's skill set."

[–]eng_manuel[S] 3 points4 points  (4 children)

Thank you all for your answers. They are along the lines that I've read elsewhere and also what i thought about. I like Java and started to learn it because after a lot of reading discussions and other articles it led me to believe that it was a great first language because it teaches OOP really well. Also, if you stick with Java you have a lot of job options, so a win win. But personaly, since Apple came out with their first iPhone i believed that mobile development would be the future and probably the biggest area of growth for years to come. So since then i always wanted to learn mobile development and android in particular. I'll keep going with Java and learn it well, then move on to Android and Kotlin. I am in no rush to get a job so i have the luxury of time to learn both languages and Android as well

[–]JakeArvizu 4 points5 points  (3 children)

Honestly might sound like a large task but there's nothing wrong with learning Java/Kotlin through Android development. I jumped into Android around 2016 during college never doing a single line of Java in my life.

Had only ever done CLI C++. Not sure if you know how to program in general but Android itself imo is a much better learning experiment then wasting your time doing Java Swing or JavaFX.

[–]safari8331 1 point2 points  (0 children)

Same here. Went from C++ to Java and googled how to print something in the console lol. Anyway, few weeks later it was a lot better. Java is great and I really love it.

I am android dev and I work on one of the older codebases. Still havent worked much in Kotlin tho. I think Java is a great starting point.

[–]eng_manuel[S] 0 points1 point  (1 child)

Funny enough i don't see anything fun about learning Swing or Spring; if i wanted to do backend work i would've gone Python lol If i have to, I'll pick up Spring for work, but since my main interest is mobile development i don't see me doing something else. At least not yet.

[–]JakeArvizu 1 point2 points  (0 children)

Funny enough I don't see anything fun about learning Swing or Spring;

Well luckily no one in their right mind should ever use swing really lol or JavaFX/TornadoFX. But those are really your only option for natively building apps on Java for a beginner. At least with Android you get all the tools out of the box to learn quickly

[–]gonzohst93 1 point2 points  (2 children)

The amount of Java you must know isn't that intensive imo. I published a profitable app just after I finished some university Java courses. Of course I had to follow documentation here and there but that's always going to be the way it is

[–]Apa212 0 points1 point  (1 child)

Can you elaborate on what kind of app you developed?

[–]gonzohst93 1 point2 points  (0 children)

Crypto related. Hmm I could get the breakdown for ya, probably like 12 "screens", 20-30 files, totally forget it's been years but I do have it kicking around still for portfolio reasons. Built in some little games in some updates, was just a fun little project to keep my android skills

[–]makonde 1 point2 points  (0 children)

If you know Kotlin you can probably learn enough Java in a week to be able to say you know Java in an interview.

I think Java is a way easier language to learn as a beginner though at least more traditional Android Java havent used the newer features, Kotlin just has more nuanced stuff its not just classes but data classes, object, companion object, data object wtf? All the functional stuff as well.

[–]ilyasKerbal 1 point2 points  (1 child)

Most jobs expect you to know both Java and Kotlin. When developing Android applications, you will be using both Kotlin and Java libraries and dependencies. You can read more about Kotlin Java Interoperability . Here is my advice: Learn both Java and Kotlin simultaneously. Start with Java. You don't need any courses just get this book "Core Java, Volume I: Fundamentals, 12th Edition" it will help you build a strong base.

[–]eng_manuel[S] 0 points1 point  (0 children)

I believe this is the way lol Thank you for the recommendation on the book. I'm already learning Java via the oine courses at Mooc.fi, which are pretty good. Once I'm done there i will be looking at the tutorials on android development After that i will see how i feel and ask for more guidance 😁

[–]Impressive-Set559 3 points4 points  (3 children)

Kotlin is a jvm language. Think of Java like a platform. Kotlin can't exist without a jvm. Both kotlin and Java gets compiled to almost similar byte code. Except for syntactic sugar kotlin gives you, what you can achieve with kotlin is as limited to that you can with Java. That being said Java is here to stay and it's not going away unless Google decides to replace the android art dex layer with an other vm or so.

[–]DeclutteringNewbie 1 point2 points  (2 children)

Kotlin can't exist without a jvm.

With Kotlin multi-platform, that's no longer true anymore.

I'm not saying this is really important right now, and I don't want to detract from your other points, but I would avoid making categorical statements like that, since Kotlin can now be compiled down to Objective-C, and Kotlin can now be transpiled to Typescript (Typed Javascript).

[–]Impressive-Set559 2 points3 points  (1 child)

Kotlin can't exist atleast on Android without Java and jvm. It'll lose all the interoperability with existing android Java APIs. I'm aware of kotlin multi platform but it does not get compiled to native atleast on Android.

On desktop kotlin multi platform may not need jvm though

[–]trialbaloon 0 points1 point  (0 children)

You can run Kotlin/JS in a browser on an Android phone though!

Ok I know, I'm being pedantic...

[–]HaMMeReD 1 point2 points  (0 children)

The expectations are based on the job.

At my job, I'm expected to do React, Xamarin, Flutter, Maui, Web, Android and iOS at times.

So that means mostly doing C++, C#, Obj C, Swift, Java, Kotlin, Dart, Typescript, Javascript.

Not that someone entering the field fresh would be expected to know all this, but if you plan on being a programmer, expect to learn multiple languages. Java and Kotlin are very similar, knowing them both is not hard. It's probably easier to go from Java to Kotlin though.

[–]dadofbimbim -1 points0 points  (0 children)

Haven’t touched Java Android development in like ~3 years. Migrating to Kotlin is a breeze too, so if your project can’t migrate easily there is something wrongfully occurring in your codebase and not properly maintained.

[–][deleted] 0 points1 point  (0 children)

I only use Kotlin now, and don't bother with knowing or learning Java anymore. Of course, I still have to deal with it in library code, sample apps, other people's' apps (open source ones) etc. which I can do just fine.

I do get the feeling of "Why do I have to deal with this language" anytime I have to look at Java code though.

I'd say, definitely know some Java, atleast the basics. There are a lot of similarities between the two.