Java vs Kotlin for Android Development in 2022

Поделиться
HTML-код
  • Опубликовано: 11 дек 2024

Комментарии • 144

  • @CodyEngelCodes
    @CodyEngelCodes  3 года назад +10

    Hey everyone, what language are you using for Android in 2021? Let me know, would love to know how many folks are still using Java full time with no plans of using Kotlin 😊

    • @thefatpakyak2826
      @thefatpakyak2826 3 года назад +1

      I was actually thinking about learning Kotlin to work as a mobile dev after I graduate. Glad I came across your video for this info

    • @CodyEngelCodes
      @CodyEngelCodes  3 года назад +5

      @@thefatpakyak2826 great to hear this video found you at the right time! I have a couple playlists dedicated to learning Kotlin, feel free to check them out. Also you’re more than welcome to join our discord, we have a coding channel where you can ask questions ☺️

    • @MateuszPerlak
      @MateuszPerlak 3 года назад

      Dart and then Kotlin if I have to 😂

    • @CodyEngelCodes
      @CodyEngelCodes  3 года назад +1

      Wow, shots fired 🤣 Flutter is cool though.

    • @jorgepolo8203
      @jorgepolo8203 3 года назад

      Thanks man, was confuse if to start with Java or kotlin.. I'm going fully kotlin now. Also I'm going to start with the google associate degree.. But what after that?? Any other course or certification that you would like to recommend??

  • @androidboss
    @androidboss 9 месяцев назад +2

    2024 still using java with full satisfaction 😎

  • @captsiro233
    @captsiro233 3 года назад +8

    12:36 If I m not mistaken you can do a ternary operator in java which looks like this:
    int max = (a > b) ? a : b;
    13:33 You can typecast in if statement:
    if (object instanceof String str) {
    str.length();
    }

    • @CodyEngelCodes
      @CodyEngelCodes  3 года назад +3

      Typecasting like that was added to JDK 14 under a preview.

  • @kind-developers
    @kind-developers 3 года назад +3

    I wonder why this video invested a lot in images and content but few views, I really appreciate your great work.

  • @JacobPernell
    @JacobPernell 3 года назад +3

    As someone getting back into learning mobile dev, this video was super helpful. Thank you! Subscribed! ✨

  • @KangoV
    @KangoV 3 года назад +5

    Kotlink coroutimes use a single thread, but Java (in Loom) uses "commonPool" which has as many threads as the CPU. Kotlin's fundamental limitation is that it works at the bytecode level, whereas Loom works at the JVM implementation level. This is why Kotlin was forced to use the "colored function" approach, whereas in Loom, they are all on the same footing. Loom is far more ambitious because it redefines the notion of the Java thread, making a positive impact on all the existing code that uses the blocking APIs. It basically reverts the definition of "modern Java", placing the oldest I/O APIs ahead of the async APIs of today.

    • @CodyEngelCodes
      @CodyEngelCodes  3 года назад +2

      Interesting, I did not know about Loom, thanks for sharing!

    • @theshermantanker7043
      @theshermantanker7043 2 года назад +1

      Java has a lot of enhancements still coming for it, it's just that they're really slow to deliver

    • @RicardoSilvaTripcall
      @RicardoSilvaTripcall 2 года назад +1

      @@theshermantanker7043 indeed, project Loom has started several years ago, and it looks like it is going to take several other years to be ready ...

    • @cylab
      @cylab 2 года назад +2

      Kotlin coroutines are not single-threaded but use a Dispatcher, which is more or less a wrapper around a ThreadPool. While Loom is great, its rather irrelevant from the perspective of an app developer.

    • @karantica3058
      @karantica3058 2 года назад +1

      @@RicardoSilvaTripcall Project loom is already previewing in JDK 19. If all goes well, it should be fully ready in JDK 21.

  • @lexsoft3969
    @lexsoft3969 2 года назад +1

    I think, I cannot ignore Java at all. The reason is there are a lot of jobs requiring skill in Java for backend; sometimes they even mention Java EE.
    That's why I am learning both.

  • @Christopher-pe6zj
    @Christopher-pe6zj 3 года назад +1

    Boom! Thank you my dude great video!

    • @CodyEngelCodes
      @CodyEngelCodes  3 года назад +1

      Christopher my dude, thank you for the great comment, made my Saturday 😊

  • @robchr
    @robchr 3 года назад +3

    I started using Kotlin when it went to 1.0 in Jan 2016. It was super easy to get working with Android studio and has great Java interop. The only reason to use Java is if you're shipping a library that is being used by Java. Some of the more advanced features like coroutines, extensions, etc are awkward to use from Java.

    • @CodyEngelCodes
      @CodyEngelCodes  3 года назад

      It’s actually not too bad shipping a Kotlin library that works with Java because of the Java specific APIs. You do have to be aware of the limitation of Java though, so higher order functions and coroutines are definitely something to not expose in the public API.

  • @lexsoft3969
    @lexsoft3969 2 года назад

    The use of colon for inheritance and use of the top level main function as the entry point sounds familiar... yeah.. C++ and Dart uses them. C# uses the colon too, although it won't extract the Main function outside a class which was adoption from Java.

  • @videomaster5437
    @videomaster5437 3 года назад +5

    After this video, I am now convinced Kotlin is the way forward. This is the next language in going to learn as I am a Android fan boy 👍🏾

  • @karantica3058
    @karantica3058 2 года назад

    Some of the criticisms to Java have been addressed since this video was released. But I don't know if they're usable for Android.
    Kotlin is definitely the best language for Android development though.

  • @pikusarker1359
    @pikusarker1359 3 года назад +2

    Sir does phd in computer science boost salary increase? Nice video.

    • @CodyEngelCodes
      @CodyEngelCodes  3 года назад +2

      It can, but not enough to be the primary motivator to get a PhD

  • @1a1o
    @1a1o 3 года назад +2

    what about dart?

    • @CodyEngelCodes
      @CodyEngelCodes  3 года назад

      Dart is good for Flutter. Flutter is good for cross platform development. I wouldn't necessarily say that Flutter is exactly the same as Android, the outcome may be the same but the technology stack used is quite different.

  • @DevlogBill
    @DevlogBill 2 года назад

    Hi Cody, I hope you read this and could help me answer an opinion by giving me your feelings or sharing your wisdom. I've been learn JavaScript for close to 10 months and recently I picked up Kotlin for mobile and found I enjoy it. But I am afraid that if I go and focus on Android development I won't find a job, I'm moving to Orlando Florida and I think there is a small job market there not sure. Also I am afraid that everything I learn with JavaScript I will loose including my skills in CSS which I got good at for designing. Is learning Android development starting completely over if I stop learning web development? How long does it normally take to become an Android developer? Thanks for reading my message..

    • @CodyEngelCodes
      @CodyEngelCodes  2 года назад

      Hey William, it depends how long you've been programming. If it has been for 10 months with no professional experience then learning Kotlin & Android now will feel like starting over, but at the same time if you enjoy Android and Kotlin more JavaScript it could be worth it to pursue since passion tends to make it easier to keep going through the rough patches of learning.
      As you learn there will probably be things that you find carry over from JavaScript to Kotlin as well which is normally how learning a new language works where you'll draw on a language that you have more experience in.
      In terms of finding a job, it's really hard to say. This job market is pretty terrible at the moment. With mobile there are fewer engineers to draw from so you're competing with fewer candidates but at the same time there are also fewer jobs to pick from too. If you felt like you're getting close to finding a job for JavaScript then it might be best to keep at it, get a job with those skills, and then learn Android on the side.
      Hope this helps!

    • @DevlogBill
      @DevlogBill 2 года назад

      @@CodyEngelCodes thank you for your advice. It makes a lot of sense, the job market is challenging at the moment, I have to create more projects and update my resume. So far I only have about 6 small projects including the last one, a calculator I recently made. Thank you once again.

    • @musviqiskndrov1793
      @musviqiskndrov1793 Год назад

      ​@@DevlogBillsir, can you make an update on your journey, how goes it so far? Did you proceed with an android development learning kotlin or find a job in frontend development?

    • @DevlogBill
      @DevlogBill Год назад

      @@musviqiskndrov1793 Hi Musviq, I am still on my path in learning Software Development. It is very tuff having a full time job where I work sometimes 50+ hours a week. But my stubborn nature forces me to code every day and I get it done. So I find the time still to code. After my last post I stopped Android Studios for 3 or 4 months and focused on Backend with Python and Django. But earlier this month I returned to Android Studio and Kotlin because I came up with the idea that I can use Django which is a back end framework and create an API with Django. Get good with Android and Kotlin and try and create a project which allows Android to make an API request from Django.
      Also, the more I looked into Android the more I realized there is a huge job market in Android which I had no idea existed. So, at the moment I am working on an Android course from Udemy using Kotlin. It is slow going because there are many lessons. But I figured it is better not to rush it but learn things deeply.

  • @storypur
    @storypur 3 года назад +1

    Is Ktor good for large-scale project development?

    • @CodyEngelCodes
      @CodyEngelCodes  3 года назад

      I haven't used ktor in an Android application but I don't see why you couldn't. Kotlin is definitely the way to go for modern Android development though.

  • @seanmkelley60
    @seanmkelley60 3 года назад

    Thanks for the video Cody

  • @iliasreventon8763
    @iliasreventon8763 2 года назад +1

    where are checked exceptions in kotlin? and 2nd why is there so trashy amount of time to compile a small app? I am trying to learn kotlin and I am struggling so hard it does not even support automatic type widenin + everything is "pythonized" which is just gross so poor to read it almost does not feel like a language I have over 8 years of experience in Java as an Android Dev and now we are forced to switch in kotlin in our company

    • @CodyEngelCodes
      @CodyEngelCodes  2 года назад +1

      There aren't checked exceptions with Kotlin.

    • @frederic_millenial
      @frederic_millenial 2 года назад

      I wish kotlin to be even more “pythonized” and get rid of curly brackets most of the time.

  • @elnuravlog
    @elnuravlog 3 года назад +1

    which one do you prefer

    • @CodyEngelCodes
      @CodyEngelCodes  3 года назад

      I dunno, it’s hard to pick one over the other 😉

    • @elnuravlog
      @elnuravlog 3 года назад +1

      @@CodyEngelCodes for salary maybe choose which one loll

    • @CodyEngelCodes
      @CodyEngelCodes  3 года назад +1

      Doesn’t make much of a difference. Kotlin is more niche and modern it can be harder to find a job specifically with Kotlin outside of Android but it’s also harder for companies to hire for that which means more money. Realistically though it doesn’t make a huge difference

    • @elnuravlog
      @elnuravlog 3 года назад

      @@CodyEngelCodes oui mon ami 😁

    • @CodyEngelCodes
      @CodyEngelCodes  3 года назад

      ami à tout moment

  • @nguyencodervn
    @nguyencodervn 2 года назад

    Thank you very much for your course.

  • @deathlife2414
    @deathlife2414 Год назад

    What about the legal issues?

  • @gellertgrindelwald4720
    @gellertgrindelwald4720 Год назад +1

    Swear to god. I thought levy from gotham chess is doing a programming video.

  • @akthamahmed2171
    @akthamahmed2171 3 года назад

    Thank you great video 👌🧡

  • @kazim353
    @kazim353 3 года назад +1

    Bro..you provide great informative videos. Glad to be one of your early subscribers 😀. I am learning Kotlin for mobile dev. Can i get your advice sometimes through social media or something?

    • @CodyEngelCodes
      @CodyEngelCodes  3 года назад +1

      Hey Kazim happy to hear you are enjoying g the videos! Outside of RUclips my discord is the easiest way to get ahold of me (link to join is in all of my video descriptions).

  • @جنوبيجيمري
    @جنوبيجيمري 2 года назад

    I am confused…is what you talked about in this video is about Kotlin native or Kotlin/jvm

  • @sawaungaung9242
    @sawaungaung9242 2 года назад +5

    I used both, people say Kotlin is better than java blah blah, but It is not only me still have fun with java, hey google itself still have fun with java, it's dependencies are still java code. It said Kotlin is null safe, but there are ways to make null safety in java. I think Kotlin is good enough, but it is not better than JAVA. What does Java Logo seem to you? yes, it is a cup of coffee. Coffee mean smooth liquid never fails to give joy or satisfaction whenever it is being drank. It may be bitter, but it has purpose. Be nice to JAVA. ;D

  • @guardianangel3425
    @guardianangel3425 Год назад +1

    Android 14 now supports OpenJdk 17

    • @CodyEngelCodes
      @CodyEngelCodes  Год назад

      I can't wait for Android 14 to be the minSdkVersion in 2036.

    • @guardianangel3425
      @guardianangel3425 Год назад

      @@CodyEngelCodes Well, I was even surprised that Google has finally trying to catch up with the latest mainstream java.
      Its a step in the right direction.

  • @cardrismusic
    @cardrismusic 2 года назад

    If Sheldon Cooper said it, I agree fully! lol Joke aside... amazing video!

  • @typingcat
    @typingcat 2 года назад +2

    I had been hating Java for almost a decade (C# user) and only started using Java because of Android. As soon as Kotlin came out, I switched to Kotlin and since then I never used Java for Android. I can think of no reason to use Java over Kotlin since wherever Java runs, Kotlin can run, too.

    • @CodyEngelCodes
      @CodyEngelCodes  2 года назад +2

      The only reason I'd use Java is if I wanted to punish myself.

    • @computernerd8157
      @computernerd8157 2 года назад +1

      I use Java because I really hate C# so to me if I can avoid using a Languange built by Microsoft specifically made to make a closed down Java is worth it to me.

    • @typingcat
      @typingcat 2 года назад

      @@computernerd8157 So, you don't like C# itself, but because of political reasons? It may have started that way, but these days, I feel .NET is more open than Java. I mean, Oracle sued Google for Java, and didn't they recently changed the licence in a complicated way that developers worried about installing JDK? I have not heard of similar moves from Microsoft regarding C#.

    • @computernerd8157
      @computernerd8157 2 года назад

      @@typingcat C# produces .exe Microsoft excutable files while Java produces a file that the JVM csn read. If C# became number one the all programs would be Windows programs that happen to run in the .Net framework. I do not trust Microsoft to not one day pull the plug on that but oracle would not benfit if they did the same. C# as a languange is not bad but because of its history and ties to Microsoft, I do not like C#. I would use it if I had no choice but I would prefer any other languange even JavaScript and its God only knows how many frameworks.

    • @computernerd8157
      @computernerd8157 2 года назад

      @@typingcat I see no reason why C# would be more portable then Java. C# may be better in that Microsoft improves it but in the end, a Java dev can use other systems like Mac or Linux and get more out of Javs then they would being C# devs at leasr until Microsoft Ports all of the .Net Framework to both systems. Even when Microsoft does we have to deal with the reality that Microsoft is has a reputation of pulling the plug when it no longer benifits them.

  • @Mohit-il9gx
    @Mohit-il9gx 2 года назад

    Kotlin/js is also their
    Can you make a video on kotlin/is vs javascript

  • @silientlips
    @silientlips 3 года назад +2

    How about multiplatform using Kotlin?

    • @CodyEngelCodes
      @CodyEngelCodes  3 года назад +1

      That’s something I’d like to explore more in the future. I think Kotlin MPP is very promising 😌

    • @ctkqiang
      @ctkqiang 2 года назад

      I use that .. quite good except for crazy low level shit . I had a project that use this for QUALCOMM BLE MESH application which is crazy to deal the code in iOS. As long as high level , I would say is fine.

  • @lexsoft3969
    @lexsoft3969 2 года назад

    Since Google recommended Kotlin, I followed it.
    Now, how about the backend ?

    • @CodyEngelCodes
      @CodyEngelCodes  2 года назад

      Programming languages for backend? Kotlin.

    • @lexsoft3969
      @lexsoft3969 2 года назад +1

      @@CodyEngelCodes In a lot of job requirements in my country that I have seen so far, they only mention Java, not Kotlin. It's a fact that I need to consider, despite all nice features Kotlin offer.

  • @ai32723
    @ai32723 2 года назад +1

    Which has future Kotlin or Java? Kindly tell me

  • @KangoV
    @KangoV 3 года назад +2

    Google's Fuchsia will replace Android. That's their goal. Kotlin is not a supported language on Fuchsia as far as I know.

    • @CodyEngelCodes
      @CodyEngelCodes  3 года назад

      Back when Google I/O was still in-person, Fuchsia was joked about every morning before the keynote. People would talk about how it will "definitely" be talked about in the keynote. Everyone knew there wouldn't be an update, so we'll cross that bridge if Google ever builds it.

  • @JonnyRootsDem
    @JonnyRootsDem 3 года назад

    You can write smart contracts on Corda blockchain using Kotlin aswel as Java, so id say Kotlin has a decent future as we'll soon be in the world of CBDCs.

    • @CodyEngelCodes
      @CodyEngelCodes  3 года назад

      Good to know! I'll have to check it out ☺️

  • @DaveJacobseniOS
    @DaveJacobseniOS 3 года назад

    Never knew much about kotlin but it sounds very similar to Swift! Thanks for the info.

    • @CodyEngelCodes
      @CodyEngelCodes  3 года назад

      Yeah, they are fairly similar, at least jumping from to another doesn’t take too much mental energy, albeit they are different enough.

  • @VCodes
    @VCodes 2 года назад

    thx a lot

  • @navjotsingh2457
    @navjotsingh2457 2 года назад

    Tysm

  • @dansteryoo
    @dansteryoo 3 года назад +1

    Thanks for making an informative video NOT related to salaries.. lol :)

    • @CodyEngelCodes
      @CodyEngelCodes  3 года назад +1

      Lol, you’re very welcome Danny, those videos were getting kind of boring to film and edit 😂

    • @dansteryoo
      @dansteryoo 3 года назад

      @@CodyEngelCodes I hope you keep pumping out more videos like this where you're just sharing your own experiences and knowledge. The most helpful ones to me were the ones about the different stages of Software seniority levels, and how much YOU made as a software engineer.

    • @CodyEngelCodes
      @CodyEngelCodes  3 года назад

      @@dansteryoo good to know. My next video will be talking about how I learned ktor recently, hoping I can get the video filmed and edited this weekend 🤞

  • @Monster33336
    @Monster33336 3 года назад

    Java is a headache to work with but it does serve its purpose. How much easier is Kotlin?

    • @CodyEngelCodes
      @CodyEngelCodes  3 года назад +4

      Once you get the hang of not needing a semicolon, Kotlin is a breeze.

  • @jessicamorris8035
    @jessicamorris8035 2 года назад

    Very informative video on two major languages of Android app development. It's difficult when to select the language for Android app development. Moon Technolabs is one of the best Android Mobile app development companies in New York that use the best languages for best android app development. Thank you!

  • @richchad101
    @richchad101 2 года назад

    nice :-D

  • @theshermantanker7043
    @theshermantanker7043 2 года назад +2

    This isn't really a good comparison of both languages as a whole, considering that Java 16/17 and newer are significantly better than dated versions of Java like 1.6/1.8. This is like comparing Rust to the ancient Cfront version of C++ and proclaiming Rust the uncontested winner!

    • @CodyEngelCodes
      @CodyEngelCodes  2 года назад +1

      You're using Java 17 for Android Development?

    • @akin242002
      @akin242002 2 года назад +2

      Android only supports up to Java 8, so all the pros of Java 16+ are irrelevant. Google leaders are going out of their way to replace Java on Android.

    • @cylab
      @cylab 2 года назад +2

      I use java 17 and kotlin in backend-services and can confirm, that java doesn't hold a candle to kotlin in terms of versatility, conciseness and joy of use.

  • @masti437
    @masti437 3 года назад +3

    Kotlin :)

  • @___Kevin
    @___Kevin Год назад

    All right I'll start this Kotlin journey

  • @weho_brian
    @weho_brian 3 года назад +1

    great another language to add to my resume that will definitely help me impress the ladies

  • @user-dm5qi4nb6l
    @user-dm5qi4nb6l 3 года назад

    what about Backend ? java or kotlin

    • @CodyEngelCodes
      @CodyEngelCodes  3 года назад

      Kotlin

    • @pistarrafernandez9830
      @pistarrafernandez9830 3 года назад +2

      @@CodyEngelCodes lol java is better for backend

    • @Monster33336
      @Monster33336 3 года назад

      @@pistarrafernandez9830
      More secured. I think you should utilize both.

    • @akin242002
      @akin242002 2 года назад

      Java for now since a person or organization can use Java 9+ versions for backend web development. Currently Java version 17 is out.

  • @cbnewham5633
    @cbnewham5633 3 года назад

    Jetpack Compose. So sad that we seem to have regressed. Now we have to write a ton of code to do UI and can't design it visually.

  • @zelowatch30
    @zelowatch30 2 года назад

    Kotlin for Apps and Java for machines like ATMs.

  • @JanM457
    @JanM457 3 года назад +9

    Switching from Java to Kotlin felt like switching from an abacus to a calculator.

    • @CodyEngelCodes
      @CodyEngelCodes  3 года назад +1

      You're being too kind to Java 😉

    • @akin242002
      @akin242002 2 года назад

      😆 🤣 😂

    • @redeyedbeast7975
      @redeyedbeast7975 2 года назад

      @@CodyEngelCodes geez

    • @navis1527
      @navis1527 2 года назад +2

      @@CodyEngelCodes java is a time machine, kotlin is a clock it can only focus on the present/android, while java can be use everywhere not just android

  • @Talaria.School
    @Talaria.School 2 года назад

    Kotlin with gradle spring android

  • @TechnologyRules
    @TechnologyRules 3 года назад +3

    I started on Android with Kotlin and I just fell in love with the language. Do not respect anyone that goes against it. Kotlin is the future.

    • @akin242002
      @akin242002 2 года назад +1

      As great as Kotlin is, never get too limited to 1 language. What is hot today will be considered trash in 20 years.
      Examples: Cobol of the 60s, C of the 80s, and Java of the 2000s.

    • @computernerd8157
      @computernerd8157 2 года назад +1

      The open source community is keeping C a live, but if you want to work for a traditional company I 100% agree with you. C and C++ will always be my fav languanges but I also know Java, and Familiar enough with Python. To me languange is irrevlant. Give me 2 days and I can get anything to work in any of these languanges.

  • @wiskasIO
    @wiskasIO Год назад

    Kotlin it is then...