Since java 14 (i think) we can write switch statement using ->. for example: switch (caseIndex) { case 0 -> System.out.println("zero") case 1 -> System.out.println("one") default -> System.out.println("sth") } and using that we don't have to add break statement
I am very new programmer, I took Amigoscode Java Master Class and I can proudly say that I am not doing not even one of these mistakes because the course taught we well. Thanks buddy! Now I see how the powerful your teaching really is
Good Information! The only thing I think is important to mention additionally is that in the first example, you should also check for null values to avoid a NullPointerException. In general I think just comparing Strings with equals without considering null values is one of the most common beginner mistakes!
thanks for the info. But I think it would have been much easier to use the "new switch expression" available since java 12, if we used that our code would have been switch (caseIndex) { case 0 -> sout("zero"); case 1 -> sout("one"); case 2 -> sout("two"); case 3 -> sout("three"); default -> sout("default") }
the implementation of .equals() method differs depending on what is being compared and the default implementation for comparing custom classes you've created is comparing their memory location and not the content of them. the lesson here is to read the documentation and to not expect them to work consistently
5 Months ago, I started studying cs in university, i still have no clue about coding... (lol) Afters seeing your video, i got smarter. Nice teaching!
12:09 you can write do-while loop instead the while loop to make it good concepts of loops
i started learning java 5 months ago and just found your channel
im currently switching back to java (from php) and videos like this are a great help. forgot a ton of stuff
4:45 Worth stressing how important it is to use interfaces. This is a very simple example, but if it’s being passed around your codebase as the concrete implementation, that’s a lot of places you’ll need to change if you decide to use a different implementation… The same is true for when you use third party libraries, database etc. You will usually want some interface to that code
The best videos about Spring Boot! Thank you very much.
Many things looks similar to JavaScript, I'm thinking of learning Java after mastering JavaScript
Very helpful in fact at the right time against cosc211 Java OOP exams we'll have tomorrow.
Really amazing, man! As junior developer I really want to thank you for the tips.
Thanks for the video and Ramadan Mubarak, brother!
Learned a lot and smashed the like button. Thank you brother.
Hey @Amigoscode, I have been watching your channel for a while and I think it's the best Java programming channel on YouTube. Keep up the hard work and wish you all the best.
Man i just love watching ur videos, learnt a lot of standards from ur code review videos. Currently i am planning to change jobs and quite afraid that i am not up to the level. :(. Keep posting these videos, i learn a lot from you, Thank u for everythiing
وعليكم السلام! جزاك الله خيرا!
@masterdjon