Тёмный

How to use var keyword in java - Brain Bytes 

Java Brains
Подписаться 678 тыс.
Просмотров 39 тыс.
50% 1

Learn how to use var in Java!
Java now has a var keyword that lets you create new variables without specifying type. In this Brain Byte, learn how to use the var keyword in Java and also where you shouldn't use it.
Java Brains website: javabrains.io
#JavaBrains #BrainBytes #HowTo

Опубликовано:

 

26 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 78   
@vendetta3656
@vendetta3656 5 лет назад
Hey man, just wanted to say that your video series have helped me reached 6 figures! Thank you for making these videos. No doubt I will continue to use your videos as a valuable resource.
@zhturemuratov6534
@zhturemuratov6534 4 года назад
When did you start programming?
@VIJAYKAUSHIKTYAGI
@VIJAYKAUSHIKTYAGI 5 лет назад
You produce or of the best technical content. love you , GOD bless you .
@suleymantekir3570
@suleymantekir3570 5 лет назад
Amin
@raviranger52
@raviranger52 5 лет назад
best explanation .. nothing new though .. this is always the case whenever we have a video from java brains
@ljka
@ljka 3 года назад
When you said that using keyword var would break the 'Programming by Interface', I frowned :( I don't think I'm going to use var in my codes... Thanks for sharing!
@aham.manishverma
@aham.manishverma 5 лет назад
As usual great explanation... Thanks for video.
@javahochzwei9810
@javahochzwei9810 4 года назад
The introduction of this concept was -imho- a big mistake. Absolut superfluous.. But anyway, you described it absolut perfect!! Thanks for your video
@AhmedRaza-rj8et
@AhmedRaza-rj8et 3 года назад
Too smart explanation
@blackpanther0990
@blackpanther0990 5 лет назад
Interesting . Java is becoming cool day by day
@amanarora2910
@amanarora2910 5 лет назад
Awesome Explanation!!!
@lliiiBodyiiill
@lliiiBodyiiill 2 года назад
Thanks for sharing
@sureshpal5569
@sureshpal5569 7 месяцев назад
great video
@palakgupta6435
@palakgupta6435 5 лет назад
Hello Kaushik, You really have a gift of teaching. If you don't mind, do you provide paid classes or you have some website where one can enroll/subscribe for his own TechStack, e.g Machine learning, data science etc.
@RPRAVEEN14790
@RPRAVEEN14790 4 года назад
Nice explanation. These features are already there in Scala.
@VishalRaoOnYouTube
@VishalRaoOnYouTube 4 года назад
I love the video, but I am not a fan of LVTI (Local Variable Type Inference). IMHO, it actually makes the code less readable and makes it more susceptible to misinterpretation bugs.
@cesardmora86
@cesardmora86 5 лет назад
a question: var names = new ArrayList(); // which method will be called? fancyMethod(names); private void fancyMethod(List list) { ... } // this one? private void fancyMethod(ArrayList list) { ... }
@shashidhar71
@shashidhar71 4 года назад
Cesar Mora Java tries to use the most specific parameter list it can find. If its Alist goes to alist method. If its some other list like linked list then goes with parent.
@asifiqbal6093
@asifiqbal6093 5 лет назад
Sir , please provide hadoop tutorial..
@kaysiz-zw
@kaysiz-zw 5 лет назад
i enjoy your tutorials, but do you have an introduction to Java for beginners?
@xyzabc12342
@xyzabc12342 5 лет назад
Thank you koushik for this great video!!!
@sreedharbabu4969
@sreedharbabu4969 5 лет назад
Clean and great explanation!!
@CodeTechClubHD
@CodeTechClubHD 5 лет назад
Explained really well.
@yt.user-zull
@yt.user-zull 5 лет назад
Thanks for sharing this knowledge!
@alokrm
@alokrm 5 лет назад
First session on Java 10 :) thanks
@opmdevil
@opmdevil 5 лет назад
Very good explanation
@sahilGupta217
@sahilGupta217 5 лет назад
I got the notification today 🙈
@syedwaseemahmed1749
@syedwaseemahmed1749 5 лет назад
Java there is no ending. Can you please make videos on audit by jpa. Please thank you.
@coffecoding
@coffecoding 4 года назад
Sir, Reactive Programming please
@asifiqbal6093
@asifiqbal6093 5 лет назад
Well explained sir.
@GAMarine137
@GAMarine137 2 года назад
An even smarter move would be to learn from the wisdom of Go and include an operator to do in one shot without var. In Go, it's just "x := 10". Other than occasional projects for work, I use Go for most things. Once you learn Go, it's hard to heading back to Java
@YtubeUserr
@YtubeUserr 9 месяцев назад
Go is bull crap
@cool-aquarian
@cool-aquarian 9 месяцев назад
I can already see developers getting confused between initialization of new variable, and assigning to existing variable. Digging a well for oneself is not called smart.
@amitchauhan1505
@amitchauhan1505 3 года назад
thanks !
@GustavoChApaza
@GustavoChApaza 5 лет назад
Good video nice explanation
@alittlecoding
@alittlecoding 3 года назад
perfect
@ayanchakraborty7842
@ayanchakraborty7842 5 лет назад
Can you help us with Data structures and algorithms...
@dharmeshpanchal4864
@dharmeshpanchal4864 5 лет назад
Thanks
@FavouriteVid
@FavouriteVid 5 лет назад
thank you!
@adityashinde3864
@adityashinde3864 5 лет назад
Sir , please makes java course .
@nikkisingh1041
@nikkisingh1041 5 лет назад
thanks sir ....i want to ask a question..is all the E-Wallet companies like Paytm,paypal..are provide us just a database for storing our credits(money) ...how can i create my own small E-wallet in my springboot webapp pleasereply me thankyou..
@papachoudhary5482
@papachoudhary5482 5 лет назад
Thanks!
@rameshchowdarykonka5551
@rameshchowdarykonka5551 5 лет назад
Tq.. Sir...
@zyrakia
@zyrakia 4 года назад
What editor is used in this video for the code?
@udaisingh8436
@udaisingh8436 Год назад
I fail to understand why do people record with dark background for the IDE's. This really makes no sense to view the things clearly. While it may be a personal preference for the one who is recording but the letters/words gets grayed out in most of the cases on the dark background...
@DavidHernandez-si9vy
@DavidHernandez-si9vy 4 года назад
whats is best? the word "var" or especificed the data type?
@dgh25
@dgh25 2 года назад
using var is a big no go - bad practise. declare the variable as a specific type if possible.
@amanulla5789
@amanulla5789 5 лет назад
What editor are you using?
@xtuff501
@xtuff501 5 лет назад
Looks like JetBrains IntelliJ
@cawlex
@cawlex 5 лет назад
I think it's Atom... not Intellij... I use Intellij it's not like that
@M-GD
@M-GD 5 лет назад
Solarized IntelliJ?
@akshaynaik4888
@akshaynaik4888 5 лет назад
which vs code theme is these?
@ReshiramR52
@ReshiramR52 5 лет назад
var in Java? I didn't know it was possible
@sujithg5873
@sujithg5873 5 лет назад
It comes java 10
@RAJATTHEPAGAL
@RAJATTHEPAGAL 4 года назад
👀 In short Java is now becoming Scala , just like C++ has auto ..... noice 🤦🏽‍♂️ not sure which demographic Java is trying to apeal or please with this chNge 😅 .... nevermind, i guess it's time to update 👀 ny Java 8,
@giovannisardisco4541
@giovannisardisco4541 5 лет назад
What JDK version allows this?
@marcokapo96
@marcokapo96 5 лет назад
Java 10
@giovannisardisco4541
@giovannisardisco4541 5 лет назад
@@marcokapo96 I heard it later, but I keep my comment if somebody else had my doubt :)
@blasttrash
@blasttrash 5 лет назад
cool
@shashidhar71
@shashidhar71 4 года назад
Nobody: Java: lets introduce var.
@CTde110
@CTde110 4 года назад
Nah c# did first
@shashidhar71
@shashidhar71 4 года назад
Oh no no its a meme terminology. It means nobody asked for it
@prashantshubham
@prashantshubham 4 года назад
Java generics and Design pattern videos please :)
@kitersrefuge7353
@kitersrefuge7353 5 лет назад
var is a disaster of a language change for Java. It will simply make code more unreadable and un-maintainable. Thank you for the presentation.
@suleymantekir3570
@suleymantekir3570 5 лет назад
We love java without var keyword.But thanks a lot for video.😁
@nirupam89
@nirupam89 5 лет назад
Is the following code allowed : var i=10; i="some string" ;
@Java.Brains
@Java.Brains 5 лет назад
In your mind, replace var with the type on the RHS and you'll have the answer. Which is no.
@huseyinaydin1002
@huseyinaydin1002 5 лет назад
yok yokluk = null; :D
@paulhetherington3854
@paulhetherington3854 2 месяца назад
He had, no derivative yet! i = letter not -- any #!
@tenminutetokyo2643
@tenminutetokyo2643 4 года назад
So now Java, JavaScript and Swift all look the same.
@SHSolutions
@SHSolutions Год назад
Not helpful, just for the lazy ones….IMHO: it doesn‘t improve anything. And why is: var i = 10; int and not byte, long,….? Is that a definition of „var“?
@torchlight6927
@torchlight6927 5 лет назад
What does java think it is, JAVA SCRIPT!!!
@Rico-by5zi
@Rico-by5zi 4 года назад
Bore off
@perschistence2651
@perschistence2651 5 лет назад
I do not understand the "coding to interfaces" part @5:10
@parvezmd6455
@parvezmd6455 5 лет назад
Sir what is bean in spring framework?
@ialpha6431
@ialpha6431 5 лет назад
as usual amazing ... you are ..
Далее
How to plan your Java learning path - Brain Bytes
16:46
Beatrise (пародия) Stromae - Alors on danse
00:44
Generics In Java - Full Simple Tutorial
17:34
Просмотров 1,1 млн
Lambda Expressions in Java - Full Simple Tutorial
13:05
Java Memory Model in 10 minutes
10:55
Просмотров 261 тыс.