Is it still worth it to learn Java for Android development as a junior?

Hey everyone!

Although I’ve been studying programming for a few years now, I’m still unexperienced and have never worked as a developer before. I’m interested in Android development and I know quite a bit of Java, but it feels like it’s very quickly getting the back seat in Android dev as most companies are choosing Kotlin.

Should I keep learning and improving my Java knowledge or would it be better for me to learn Kotlin?

2 Likes

Hello!

Learn Kotlin :stuck_out_tongue:!

Java is almost interchangeable with Kotlin (and Gradle), so it’s a “win-win” situation :stuck_out_tongue:, plus Kotlin has features not natively available in Java (You need to rely on libraries like Lombok for some things).

Yes, but is it a better investment of my time to keep with Java or to learn Kotlin for the beginning? I mean, it’s not like I’m not going to learn Kotlin eventually. It’s just that I’m thinking which would help me get a job the fastest

The way I see it, You’ll have more chances with two languages than just one (even if You have little experience/knowledge), so I would go with Kotlin (or both, if You have the time).

2 Likes

Now that’s a good idea. I think I’ll keep using Java for a while since that’s the language chosen for the Udemy course I bought. Then I’ll pick up some Kotlin and see how it goes. But I’m under the impression that the experience isn’t that much different. Am I right?

The experience can be quite different :sweat_smile: with regards to the syntax (even though I said they’re mostly interchangeable):

  • Kotlin is far easier to write in contrast to Java while still being strongly typed.
  • Kotlin has some syntax sugar that will make Your programming more efficient. For example, checking nulls:
fun main(args: Array<String>) {
    val utils = Utils();
    println(utils.len("a string"));
    println(utils.len(null));
}

class Utils {
    fun len(s: String?): Int? {
        return s?.length;
    }
}

VS Java’s version:

import java.util.Optional;

public class App
{
  public static void main(String[] args)
  {
    Utils utils = new Utils();
    System.out.println(utils.len(Optional.of("a string")));
    System.out.println(utils.len(Optional.empty()));
  }
}

class Utils {
  public Integer len(Optional<String> s) {
    if (s.isPresent()) {
      return s.get().length();
    }
    return null; 
  }
}

In Java You’ll write more code, which will make You less efficient.

By the way, Java/Kotlin/Gradle are not the only languages that work with Android, if You don’t already know. There is also C# (which I also like :stuck_out_tongue:).

There are also hybrids like Apache Cordova (among others), which allow You to build apps for Android and iOS with one code base. The bad side is that they use a browser to work, hence the app will be less performant and the API available will depend on the version of the Android/iOS platform You’re targeting.

Lastly there is NativeScript and React Native which are supposed to create native apps (not a browser app). I have little to no experience here, so I cannot say much.

I hope this helps a little :slight_smile:, if not, ask more :stuck_out_tongue:,

Regards!

1 Like

Bear in mind that you’re unlikely to ever have a problem getting hired if you know Java, and that’ll be the case for a long while. Kotlin is useful for a specific usecase (new Android apps) and it’s steadily gaining mindshare: very good thing to know for the area you want to work in, but knowing Java is currently one of the most useful skills you can have re getting a job in software, so 🤷

3 Likes

The syntax difference really is impressive. But I meant things like using the same classes, methods and patterns. They’ll probably be the same for both languages most of the time, right?

For alternatives, I’m looking at Flutter. I really like the technology, but it’s still a little too early to focus so much on it since there are almost no job openings for it yet (at least in my area).

I know Java is very popular in the tech industry, but my main go with has always been building Android apps. For a while I studied a bit of Spring because I was stuck with a simple notebook that couldn’t run Android Studio, much less an Android emulator, so I took the next thing most Java developers work with. But I kind of hated Spring. It felt incredibly boring.

Totally :slight_smile:! Classes are compatible between both languages. You can build a software using both Java and Kotlin; no need to create a different project. However, You may have problems with some IDEs that may not understand both.

Android Studio should not have any problem working with both, since it’s based on IntelliJ.

I’ll say this just in case You (or someone else) doesn’t know: You can build Android apps without using the emulator using a physical device. Of course, You’ll be limited to the devices You have at hand, but definitively is more performant than the emulator :stuck_out_tongue:.

Spring may feel boring because You’re targeting at mobile development, but for the people that work on building REST APIs (or other server side apps), Spring is quite convenient, specially using Spring Boot. Spring is highly opinionated, which pushes You for best practices and enterprise patterns, which can be boring :stuck_out_tongue:.

If, in the future, You’re asked to build a server side project, don’t forget about Spring, which will give You many tools to build it faster :slight_smile:.

1 Like

In todays Digital Economy, its all about getting the customer who is identified with a problem to use your solution (Speed to Market). With this landscape, learning new programming languages may not be brilliant idea, particularly when so many Tech Disruptions are happening and new Agile methodologies are being sought after to get the Minimum Viable Products accepted by Businesses.

If a Low Code or even a No-Code options is being provided to enhance the delivery of projects by the devOps team, both android and iOS mobile App Users are taken care of with one Rapid Mobile Applications Development tool that does a majority of the App with visual interpretations rather than coding or NO CODE even.

Key Takeaways for developers and businesses adopting NO CODE way of developing Enterprise Mobile Apps are :- 1) No specific programming language skillsets required to build Mobile Apps needed 2) Allows you to build and deploy across multiple platforms (Android and iOS) 3) Development time and delivery increased with a 10X 4) UI/UX design interfaces created efficiently with ready made customizable templates and functions. 5) Subscription based models on the cloud 6) Backend Data Integration simplified with ready made connectors to the backend

So there you have it

1 Like

This is incoherent; have you challenged yourself to fit as many buzzwords as possible into one post?

2 Likes

thanks for your feedback. Will be happy to elucidate where required:+1:

Thanks for the useful information.

DanCouper has a point. Java is used everywhere.

@shaamel
If you are talking about sites like wix, you are either:
1.) financially motivated for this to be the case, or
2.)seriously confused.
These programs are usually built for people who do not know how to code. You develop your program using a UI and it writes the code for you. However, the result is bad code. impossible to maintain without that environment. People have been trying to make this work since Adobe Dreamweaver came out. Do a Google search of the term “WYSIWYG”

I still wanna reply on this one,

My opinion is that ReactNative/Flutter etc. The future is. Not Java anymore. JavaScript and Dart is much more easier and more powerful. And it is cross-platform. I do not recommend learning Java, if learn Kotlin. Or Swift.

I wouldn’t count out Java. It is still in use and will likely continue to be used for quite some time. I’d pick up the languages that are in use in the fields and companies you are interested in rather than only learning about the newest languages out there. New languages take time to mature and take root.

You can always learn new languages in the future, but it’s hard to get a job if you are only comfortable with a language that does not have wide-spread use.

Some dynamic stats on GitHub repos: https://madnight.github.io/githut/#/pushes/2020/1

2 Likes

Kotlin is basically Java on steroids.
You should definitely learn Kotlin as it provides a lot of functions and libraries which helps in a lot of use cases.

For instance, consider kotlin coroutines, it provides you with the easiest way possible to jump between different threads in android
The view model implementation is easy, dagger injection is great, and there is a lot less boilerplate as compared to the same implementation in Java.

I in now way am trying to say to scrape out Java, after all the code is based upon its Java implementation, but Kotlin is a must to know.

Also, one more thing, companies nowadays prefer Kotlin over Java because Kotlin provides a lot of things to avoid NPEs (Null Pointer Exceptions), which is a very big issue for developers.

One of my friend has been developing in Java and Javascript for more than 3 years. Recently he started learning Kotlin, which he believe is the future of Android Development. He has shared his thoughts in his article, may be this will help you-
Here’s the link-
Kotlin vs Javascript — Learning by comparison