Its good that they have finally updated the switch statement syntax. Not that I had any issue with the previous syntax with break statement but now the arrow syntax definitely makes the code more readable and easier to write. And I just love the fact that they have added the return feature in switch, it makes a lot of things easier😁
@BruceWayneLive7 ай бұрын
as an old school learner, the old switch syntax was cooler, no offence to the new learners.
@bhanuprakashreddy4834 Жыл бұрын
00:03 Updated version of switch statement in Java 01:32 Using switch statements in Java 02:55 Application to set alarms based on the day 04:19 Waking up schedule 05:42 Updated version of system.twintellin has new features. 07:04 Assigning a value to a variable instead of printing it directly 08:27 Using switch as an expression 09:51 Java 12 introduces the use of 'yield' instead of 'break' in switch statements
@saishiny6684 Жыл бұрын
The way you explain is excellent sir. Iam very grateful to you sir.I hope one day I can explain like this to others.
@devanshusachdev7367 Жыл бұрын
That's the benefit of following Navin sir's videos! Thank you sir for sharing :)
@MrKoniInTech2 жыл бұрын
Love and respect from 🇨🇩🇨🇩🇨🇩 your channel has helped me a lot NAVIN.
@Heyaadi014 ай бұрын
I really like your explanation... I really wanted to you as a Java Teacher in my College 😄
@kamakshijayaraman374711 ай бұрын
i liked old switch statement
@santoshram1241 Жыл бұрын
I liked it and felt more relevant than old syntax
@GoogleRalCoderHUB990510 ай бұрын
So Amazing teaching style sir thank you🎉🎉🎉🎉🎉
@codewithakram2 жыл бұрын
I like this syntax... Thanks for keep updating us.. i hope you will give such update in future also.
@minor12828 Жыл бұрын
I like the switch updates. Thanks man 👍
@shawngardiner2604 Жыл бұрын
Love the new switch syntax! Didn't have an issue with the old way as it is more expressive but this new way has certainly grown on me.
@yashjangid42222 ай бұрын
sir we need to take the valur in input then what we have to do like for EX- enter the day = " " //then it gives the time
@monishas24748 ай бұрын
When we need to write more than one line in cases,how can we use arrows sir.
@CICADA-ci8pr3 ай бұрын
Good question bro
@kurtismcdowell6O3124 күн бұрын
switch (day) { case 1 -> { System.out.println("Monday"); System.out.println("This is an other instruction"); } You need to pay attention here, you will not have a return statement ,the switch case statement should not return a value (like the old switch case version)
@C_o_d_e_Help Жыл бұрын
Looks readable & amazing!!
@fifaham Жыл бұрын
I like the arrow operator, without the "break" statement. I see lots of similarities between C and Java, I am C embedded designer. I am planning to use Java for embedded (small computer forms - Microcontroller based) web servers. In your openion, what is a good Java flavor, library, extension and whatever that best fits for embedded designers? Is there a Java package that is dedicated mainly for embedded (hardware and software) designers? What is a good website that explores those possibilities? I am familiar with Eclipse, Andorid Studio, and many dedicated IDEs that belong to silicon manufacturers and their likes among IDEs - your help is greatly appreciated.
@ashleyleale67037 ай бұрын
Thank you I like the new update it helps me reduce the amount of text typed when coding.
@raghavsrivastava29102 жыл бұрын
Great features. Very informative video. 🔥
@naveenkatakam808216 күн бұрын
This is cool and easy to understand
@ajayghode36024 күн бұрын
Wonderful video Thank you
@BakhtyarQadriCodeArtist7 ай бұрын
Correction: Strings are supported from Java 7
@22_ankanamajee97 Жыл бұрын
very much liked this new switch case functions
@kumarmahendra26112 жыл бұрын
What if we have to execute Multiple statements after -> or yeild ?
@teluskosupport12 жыл бұрын
for that simple use previous concept of switch;
@lalit-singh-bisht Жыл бұрын
do we have to write it in a block with there are multiple statements associated with a case
@bro_chenzox Жыл бұрын
For Saturday and Sunday you set an alarm clock earlier than for weekday. Java developer as is.
@maheshBasavaraju2 жыл бұрын
I feel we don't need to put break at the end of case. Next case starting means end of the previous. Hope they remove that break without changing the syntax
@deebaksharma755610 ай бұрын
Why it is not working in vs code?
@BIT_RaginiV7 ай бұрын
after arrow operator , can we use compoud statement?
@AbdifitahAbdulkadir2 жыл бұрын
IT IS very good feature I like this new feature
@Ahmadzai-15 Жыл бұрын
Amazing the new method 👍
@underflo43tkyКүн бұрын
what ide are you using here?
@selinselvarani316123 сағат бұрын
Visual studio
@RealRameshBabuАй бұрын
New syntax is much better, I liked the -> arrow ones to writing yield
@buddareddycheppala38922 жыл бұрын
Really good future and thank you for explaining us
@chetanbharat67662 жыл бұрын
Is there any relationship with Lemda -> or switch ->
@saurabhkumar-xm8wb Жыл бұрын
Can we write multiple line statements in cases as we do in lambda expression using open close braces?
@hey-cg3fv Жыл бұрын
yes but use yield keyword
@lakshmanabanki89002 жыл бұрын
Sir please make videos on frontend development using python programming .please sir
@CodingBirdsOnline Жыл бұрын
java --version java 12.0.2 2019-07-16, I see java 12 in my system, but this syntax not working, getting an error.
@sathishkumars3732 жыл бұрын
Thank you for your teaching
@yashjangid42222 ай бұрын
superb
@AmareswarraoKothapalli Жыл бұрын
its good for understanding sir
@bassenhancedmetal6842 жыл бұрын
Commenting for the algo. Quality content.
@Him8572 жыл бұрын
I don't know but have gut feeling soon java will be standing next to python and R for ML or may be for block chain
@riswanahamed62248 ай бұрын
the format case "monday" -> output is not working ..showing like invalid syntax
@ehteerk Жыл бұрын
why am I getting an error when using multiple cases in single case public class Main { public static void main(String[] args) { String d="f"; switch(d) { case "f", "m": System.out.println("work"); break; case "sat": System.out.println("gym"); } } } ERROR: Main.java:19: error: : expected case "f", "m": ^ 1 error
@ingenium8452 Жыл бұрын
i am not facing any issue bro public class hello{ public static void main(String[] args){ String d="f"; switch(d) { case "f", "m": System.out.println("work"); break; case "sat": System.out.println("gym"); } } }
@rajualiendog8954 Жыл бұрын
Where you got updated these things sir
@aniketankush2187 ай бұрын
Yes, I enjoyed your video!
@bhavinpatel10149 ай бұрын
I loved the switch new syntax.
@lathakarthikv1335 Жыл бұрын
What if we want to have more than one statement in updated switch block..
@kartikeyanbagali1203 Жыл бұрын
What if for each case we want to return different data types then how we can assign switch case to reference variable (result)
@raviteja-u9u Жыл бұрын
i think older version is good according to coding lines and syntax
@shinobiworld8603 ай бұрын
Other guys- hello students, what's up guys He - welcome back 👽
@sudharshan72032 жыл бұрын
is this update a good way? In case I need to continue the block. what can I do in the update switch statement? I think this update is easy to write a code but how do we continue the block?
@7amalex763 Жыл бұрын
It's definitely welcome feature to not have to declare a break statement on all my switch cases.
@Myworld-gb6rz Жыл бұрын
thank u very much actually it's makes a sense
@venkatbalaga58922 жыл бұрын
Thank you so much sir ❣️
@alexikamran70392 жыл бұрын
break seems like good for kick start/
@bswt002 Жыл бұрын
Where can I see new updates like this?
@jebaranit447410 ай бұрын
It’s similar to cpp(Most of the syntax)
@ramankaushish77202 жыл бұрын
It is actually great...
@randomshorts10392 жыл бұрын
finally, now they are adopting kotlin syntax.
@108vicky2 жыл бұрын
Nice tutorial
@vishwasrchonu71348 ай бұрын
Java is copying things from python and javascript, finally!! 😂😂😂
@deepadevi89117 ай бұрын
Yeah it seems
@henrycepeda57092 ай бұрын
@@deepadevi8911jejejeje. As the same python copied several features from Java and other languages.. Great! There are many changes to continue improvement our daily sofatware development..
@MohaleMohale Жыл бұрын
Lessons are Good, may you please not blur the board!
@bucztechph Жыл бұрын
So basically they allow to put lambda expressions in switch case
@ilyabritkov2478 Жыл бұрын
Sad that pattern Matching, gaurded Patterns and null-safe were not covered
@aruns6214 Жыл бұрын
Sir we cant use switch statement in while loop because the break statement breaks entire looop😔😔
@Wanderer3639 Жыл бұрын
I just learned you could use multiple conditionals for the same case... I just copied the code 2 times.
@curiosity69692 жыл бұрын
22 seconds of darkness at the end...
@harikavaishnavi79574 ай бұрын
Thanks
@MarioBuchichio Жыл бұрын
I never understood the concept of the old switch needing the break. I guess it serves a purpose for some people, but it makes no sense to me.
@commonman57682 жыл бұрын
Hi sir, I'm stuck as software test engineer. I need to switch to development please suggest good path. I'm flexible in coding language
@pamusohith5472 жыл бұрын
Thank you sir
@MkTechriku4 ай бұрын
Awesome
@rishibose08 Жыл бұрын
I like it.
@siva5258 Жыл бұрын
I think it's a good thing but old switch is better than this 😁
@divergenny2 жыл бұрын
Thank you
@SatendraKumar28 ай бұрын
Coming from golang its normal but here looks like oracle or Java communities trying hard to catch up with modern language like go.
@fundango76905 ай бұрын
its good
@newworld8061 Жыл бұрын
good
@sushilrawal48882 жыл бұрын
Thanks sir
@VamsiYalamati6 ай бұрын
THAT'S GREAT
@faarouqasaju6023 Жыл бұрын
I'd stick to the old syntax
@dracula9504 Жыл бұрын
Better create new language for this. It makes java more complicated. This is good for intelligent people. How about the average? Maybe they have no right to become a developer.
@adityabhardwaj9954 Жыл бұрын
This video series is unique but language problem 😢 Hindi or English mix rahta
@giritalari7932 жыл бұрын
Great
@christcombiccombichrist2651 Жыл бұрын
Shit java is too much every time I think I reach the end of a lesson , some new thing always comes up. I haven't gotten any where as yet to build a project. But any way I'll try.
@dynamohack2 жыл бұрын
nice
@nishantvijaybadgujar88575 ай бұрын
Nice feature😅
@subhajitbarh84352 жыл бұрын
java is the new kotlin
@shashanksinghsisodiya5142 жыл бұрын
I don't even know Java 8 and Java is at v17🤦 after v100 Java will be rebranded to new jabaa language 😁😁