Java for C# Developers

Поділитися
Вставка
  • Опубліковано 23 гру 2024

КОМЕНТАРІ • 78

  • @qwertyls8552
    @qwertyls8552 4 роки тому +27

    You are very good at explaining stuff. Thanks for making this amazing video!
    P.S. God bless you for using subs and dark themes....

    • @ABCo-ABMedia
      @ABCo-ABMedia  4 роки тому +4

      Yep, I always add subtitles to all my videos, even my first videos on this channel (which are now unlisted because they're pretty bad) had subtitles! As for the dark theme, yep, even my UA-cam is the dark theme!

  • @subliminalcastillo2126
    @subliminalcastillo2126 4 роки тому +16

    Thank you so much for these "x language" for C# developers series. It is so ridiculously helpful, as I'm a native C# developer who wants to expand my understanding beyond syntax and language-specific convention. I also love your C++ one especially.

  • @mattjw16
    @mattjw16 2 роки тому

    I am a Java developer looking to _sharpen_ by C# skills. This tutorial was very good in outlining the major differences in Java and C#, even though I am using it the other way around. This tutorial is 10x better than even the videos on UA-cam designated to “C# for Java Developers”.

    • @ABCo-ABMedia
      @ABCo-ABMedia  2 роки тому

      Glad to hear you found it helpful despite it not just fitting what you were looking for! Honestly if you ask me C# is much nicer language, even just things like the fact that we have "properties" as opposed to having to make "get" and "set" methods manually everywhere, so hopefully while _sharpening_ your C# skills you'll find it to be quite a pleasant experience!

  • @PeterHansson-nm8kx
    @PeterHansson-nm8kx 2 роки тому +2

    Good video. There are some things that need to be said though:
    You spend a lot of time in the video on the installation of JDK/JRE (btw, this distinction doesn't exist anymore). Two things to be said here:
    - Nobody fiddles with JDK installation. Most devs that I know just download and install something like IntelliJ IDEA (the one you use in the video) or Eclipse IDE. They come bundled with a JDK but they also allows you to add additional versions/distributions of JDK from within the UI, if need be.
    - JDK doesn't need to be installed. This throws off people coming from DOTNET world. What do I mean by that? Well, it has literally zero dependencies on the OS, so it is really just a ZIP. The word "installing" in the JDK world means including it in the PATH, which you don't really need if you work from inside an IDE. And just like in C# world, nobody really does Java development without an IDE.
    I don't know anyone who these days use Oracle's Java for development purpose. Heck, you can use Microsoft's JDK, which is in my view a stellar distribution of the JDK. Yes, you read it correctly: Microsoft's JDK !!! Anyone can make their own distribution of the JDK. In April 2019, Oracle changed the licensing terms of their distribution of the JDK (unsurprisingly termed "Oracle JDK") so that it would cost money for non-commercial use. This applied for a couple of years until it was reversed with Oracle JDK 17 (after you released the video) so that it is now free of cost again. However, Oracle's move had very little impact as people just started using one of the other JDK distributions that were/are free to use (Amazon's, Microsoft's, Eclipse Adoptium, Azul, BellSoft, etc). I know that the choice of JDK distribution can be daunting when coming from the DOTNET world. The truth is that for development purpose, IT DOESN'T MATTER WHICH ONE YOU USE. You'll probably just be using the the one bundled with your favorite IDE and that is fine. Once you deploy, you are very likely to be effectively deploying on Microsoft's JDK (if you use Azure) or Amazon's (if you use AWS), but you'll never notice, nor do you need to care. Very few Java developers deploying on cloud will know that their code is actually running on say Microsoft's JDK. That's how much (little) it matters.
    So to those learning Java, coming from C# world: Don't follow the video's advice on "installing" java. It is completely unnecessary. If you at some point need to use Java outside of the IDE then you can at that time revisit the subject. Remainder of video if excellent. Thumbs up!

    • @ABCo-ABMedia
      @ABCo-ABMedia  2 роки тому

      A lot of good points here!
      I absolutely agree that the installation part of this episode is far too long, and if I were to make this video now there's no way I would've repeated that. If I recall correctly, it was literally down to a combination of wanting to try out recording footage in Mac OS X and Linux for once, combined with the way this video was specifically requested - and it's just wasted space really. That section is even presented almost like it's a complete break-down of how to install on all platforms when it's not even, it's just... Yeah. And I don't think I even considered that, of course, IDEs will provide their own installation options for the JDK anyway, which does further support that if anything the section was simply unnecessary.
      That being said, I still stand by a lot of what I _did_ say in there, I specifically called attention to the OpenJDK as an alternative for the Oracle JDK which was paid at the time, to show that there are other options, as you also point in this comment as well. And I do think I conveyed that it doesn't matter whether you use the Oracle JDK or another JDK version, again by calling attention to OpenJDK. Definitely not perfect, that segment really wasn't, but I do think that content was _there_, and I guess it can be repeated here to make it even clearer, I'm cool with that.
      I still think that even if an IDE does it for you, it's not too unhelpful to at least know, and only looking at your platform-specific stuff, it's not as long as it looks, but I agree it may have been misleading. Glad you enjoyed the rest of the video anyway!

  • @SnakePvM
    @SnakePvM 4 роки тому +3

    Thanks for the video man! I have been programming in C# for a long time and I have to learn Java for a new job. You've done a great job explaining the differences, it's very clear. I'm confident now that learning Java will be easy coming from C#

    • @ABCo-ABMedia
      @ABCo-ABMedia  4 роки тому

      Yeah, they are very similar languages, but these differences can catch you out, so it's good to know these! I'm sure there are other more subtle differences, but this video certainly covered the big ones!

  • @guslindell3367
    @guslindell3367 4 роки тому +10

    This is exactly what I was looking for, thank you

  • @Layarion
    @Layarion 2 роки тому +1

    You Explained Packages vs Imports perfectly, ty.

  • @markbogan7869
    @markbogan7869 2 роки тому +1

    Well done! Right to the point, no wasted time or overly complex examples. Bravo...

  • @jkone27
    @jkone27 3 роки тому +2

    Omg the checked unchecked exception mess, great video !

    • @ABCo-ABMedia
      @ABCo-ABMedia  3 роки тому

      Heh, it was an interesting thing for me to research for this video.

  • @janivimal
    @janivimal 4 роки тому +5

    wow , what an explanation !! too good. Thank you for sharing !!

  • @Aragubas
    @Aragubas Рік тому +1

    thank you so much!!!! I needed to learn Java for a project I was going to contribute and this helped me lots, I started coding in c# when I was 10 years old so Java seemed like the same thing for me, turns out it's quite different x3 I love how the error checking system works as well x3

  • @kristiyankrastev8279
    @kristiyankrastev8279 3 роки тому +3

    no multidimensional arrays (thank god) :D... i hated my life when i did the jagged array exercises in C#

    • @ABCo-ABMedia
      @ABCo-ABMedia  3 роки тому +1

      Haha. I take that "thank god" back now, it was quite a biased view on multi-dimensional arrays in C#, and I was actually referring to regular old "int[,]", not "int[][]". It's a long story, but it's to do with serializing them, and, well, I don't think it was really a fair comment.
      Jagged arrays (int[][]) actually also exist in Java because all it really is, is just an array _with_ _arrays_ as each item, and that works in just about any language because why wouldn't it, it doesn't need any special treatment to make it work, it's just an array... With arrays as items, that just... Works by itself.

  • @Nokaflai
    @Nokaflai Рік тому +1

    Really great video. Helped me a lot with understanding core differences

  • @triangle4studios
    @triangle4studios 3 роки тому

    I think its very important to note that the cost of a single seat of Java SE is a mere $2.50 USD per month. Thats the price of a cup of coffee and if they implemented this 10 years ago they would be one of the richest companies in the world since Java is used on everything, from the International space station, to Cars, Airplanes, Ships, Trains, Energy Providers such as power plants and so much more.
    I honestly feel that if you are going to make money using Java, pay they $2.50 per month to support them. They deserve it.

    • @ABCo-ABMedia
      @ABCo-ABMedia  3 роки тому +1

      I'm all for commercial products, but they literally just sprang the payment up out-of-nowhere specifically to force everyone who was locked in with Java to now pay up. Part of the reason people went to Java in the first place was that it was free.
      Because if it's not free, then what's the point? At that point, other than than the fact that they've locked you in, there's no reason to not just use a language like C# that literally performs _better_ and is fully open-source, has hundreds of thousands of libraries etc.
      Again, I'm not _that_ opposed to their decision, but I'm not a very huge fan of it either

  • @fieryscorpion
    @fieryscorpion 10 місяців тому

    This is an excellent video. But why is it unlisted? It doesn't even appear on searches.
    And would you make more videos like this? Thanks!

    • @ABCo-ABMedia
      @ABCo-ABMedia  10 місяців тому

      Hey, I unlisted it very recently. It was spurred on by one of the comments here which, rightfully, pointed out how trash the Installation section, particularly for Linux, is. You'll be able to find the comment somewhere in here. I might see if I can cut the Installation part and make the video public like that at one point.
      I will be making more programming videos in the future

    • @TheRealXartaX
      @TheRealXartaX 7 місяців тому

      @@ABCo-ABMedia The video is great, I found it through a direct link on Reddit. It's a shame to hide it. You can always put in a card saying to skip this section for the setup.

    • @ABCo-ABMedia
      @ABCo-ABMedia  7 місяців тому

      @@TheRealXartaX I appreciate that. I'll bring it back for now, it looks like I should be able to cut the section out with UA-cam's Editor, so that'll solve that problem!

  • @jollyvoqar195
    @jollyvoqar195 2 роки тому

    Great video, thanks. You can do that param name thing in c# itself sort of, or I've seen it done in VS (may have been resharper).

    • @ABCo-ABMedia
      @ABCo-ABMedia  2 роки тому

      You can actually write it explicitly in the C# code itself if you wanted! But yeah there are ways to get it showing that in Visual Studio too!

  • @triangle4studios
    @triangle4studios 3 роки тому

    Another small side note, is if you simply search for environment variables, you cannot edit the system variables, only view. You must go through the properties variation outlined in the tutorial.

  • @triangle4studios
    @triangle4studios 3 роки тому

    This is one major thing you left out, and that is volatility. Variables that do not inherit from object, need the keyword volatile for them to write to memory. This especially important when checking variables from other classes.
    For example, if you have a boolean in public class a, and try to access it in public class b, it will always evaluate to false in public class b. By making it volatile, it gets written to memory, and thus can be used pan-all classes.

    • @ABCo-ABMedia
      @ABCo-ABMedia  3 роки тому

      Huh, I had indeed never heard of that before

    • @DerTolleIgel
      @DerTolleIgel 3 роки тому +1

      This is only relevant for multi-threading. Variables get cached, and you cannot know when it is written back to memory, which may result in another thread to read outdated values. volatile keyword makes variables to always be written back to main memory, so this does not happen. So although it is nice to know, this is only important for specific use cases.

    • @PeterHansson-nm8kx
      @PeterHansson-nm8kx 2 роки тому +1

      I think you need to read up on what the keyword "volatile" means in Java. In fact, to my knowledge, it means exactly the same in Java and in C#, so no reason to mention it in the video.

  • @andreassmedjebacka5785
    @andreassmedjebacka5785 4 роки тому +2

    Excellent explanations, good tempo. Thanks!

  • @mopri24yt
    @mopri24yt 4 роки тому

    I was looking for properties from C# in Java and I found a great video! Your explanations are very good!

    • @Alex-ABPerson
      @Alex-ABPerson 4 роки тому

      Glad it was helpful! Yeah, Java doesn't have properties, it really is just one method to get and one method to set!

  • @Layarion
    @Layarion 2 роки тому

    Oh, so I think you're saying that in Java, any piece of normal code that has "throw" or "throws" anywhere in it, the compiler will refuse to compile if it doesn't see a catch for it -somewhere-. But in c# something could have "throw" in it, and the compiler doesn't require that you have a catch for it anywhere. Just allows it to crash if it's unhandled, where as Java refuses to let things marked with "throw" crash the program if it's unhandled.

    • @ABCo-ABMedia
      @ABCo-ABMedia  2 роки тому

      I have no idea why I haven't responded to this yet. Yep, that's it!

  • @VEKTOR_87
    @VEKTOR_87 3 роки тому +1

    really good explanation

  • @joelkowalski6869
    @joelkowalski6869 3 роки тому +1

    I can not believe it. You helped me so much! I can´t thank you enough

  • @Layarion
    @Layarion 2 роки тому

    shit, pretty good video already within the first three minutes.

    • @ABCo-ABMedia
      @ABCo-ABMedia  2 роки тому

      I'm glad to hear you think so - I think this is actually one of my worse videos when it comes to opening time, as it spends quite some time on setup, but I definitely never want to spend any time waffling, yeah, no point in wasting the viewers time so I always get right into it

    • @Layarion
      @Layarion 2 роки тому

      @@ABCo-ABMedia well what I liked about it, was you already explained to me some things I might run into. Like wtf is open jdk vs jdk, and then you explained that I don't need JRE if I have JDK.
      I'm trying to work on existing Minecraft 1.12.2 mods with no experience in programming. other than little projects I did in c# and Unity.

  • @thinog
    @thinog 3 роки тому +1

    Thanks! Helped me a lot

  • @rezaru2000
    @rezaru2000 2 роки тому

    Thanks this is useful. Also great presentation, you didn't waste a single second :)

    • @ABCo-ABMedia
      @ABCo-ABMedia  2 роки тому

      I think in hindsight I may have wasted a little on the whole "installation" section, but yeah from there it was pretty smooth. Glad you enjoyed it nonetheless!

  • @rushas
    @rushas 3 роки тому

    Great video! Very well explained. Thank you so much

  • @juanavelinosanlucas6129
    @juanavelinosanlucas6129 3 роки тому +1

    Excelent!

  • @gsgmedina
    @gsgmedina 3 роки тому +1

    Awesome video!

  • @beziko
    @beziko 3 роки тому

    Very good video!

  • @jhorne4
    @jhorne4 3 роки тому +1

    Great video thank you

  • @Zeioth
    @Zeioth Рік тому +1

    Oh fuck I was so intimidated, but they are pretty much the same language.

  • @nigabals566
    @nigabals566 3 роки тому +1

    great video

  • @pacocu9839
    @pacocu9839 4 роки тому

    Thanks, very useful :)

    • @ABCo-ABMedia
      @ABCo-ABMedia  4 роки тому +1

      Thanks a lot, glad you think so. :)

  • @yeetproduction7551
    @yeetproduction7551 2 роки тому

    But I have visual studio

  • @hriday684
    @hriday684 3 роки тому +1

    You _totally_ forgot structs.

    • @ABCo-ABMedia
      @ABCo-ABMedia  3 роки тому

      Hey! I didn't intend for this video to be a complete list of everything, only the major differences, so I missed out structs.
      Good thing it's quite a simple answer - structs just don't exist in Java. They really, really should and it's one the *biggest* problems Java has when it comes to performance, that it doesn't provide a way for you to make your own value types, it's really terrible that they still don't have it, but that's how it is!
      Also, do I know you from somewhere? I swear I recognize your name :P

  • @christinedalida6163
    @christinedalida6163 3 роки тому

    thanks!

  • @moistness482
    @moistness482 11 місяців тому

    Do NOT follow his instructions for installing on Linux. Your package manager is gonna have a Java package. Just install that and you'll be done.

    • @ABCo-ABMedia
      @ABCo-ABMedia  11 місяців тому

      Absolutely, you're definitely right. I decided to unlist the video since it's old and doesn't meet everything I would've done nowadays anyway ¯\_(ツ)_/¯