How to use var keyword in java - Brain Bytes

  Рет қаралды 38,833

Java Brains

Java Brains

5 жыл бұрын

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

Пікірлер: 76
@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?
@raviranger52
@raviranger52 5 жыл бұрын
best explanation .. nothing new though .. this is always the case whenever we have a video from java brains
@aham.manishverma
@aham.manishverma 5 жыл бұрын
As usual great explanation... Thanks for video.
@amanarora2910
@amanarora2910 5 жыл бұрын
Awesome Explanation!!!
@zulfequar_ali
@zulfequar_ali 5 жыл бұрын
Thanks for sharing this knowledge!
@sreedharbabu4969
@sreedharbabu4969 5 жыл бұрын
Clean and great explanation!!
@xyzabc12342
@xyzabc12342 5 жыл бұрын
Thank you koushik for this great video!!!
@VIJAYKAUSHIKTYAGI
@VIJAYKAUSHIKTYAGI 5 жыл бұрын
You produce or of the best technical content. love you , GOD bless you .
@suleymantekir3570
@suleymantekir3570 5 жыл бұрын
Amin
@blackpanther0990
@blackpanther0990 5 жыл бұрын
Interesting . Java is becoming cool day by day
@CodeTechClubHD
@CodeTechClubHD 5 жыл бұрын
Explained really well.
@asifiqbal6093
@asifiqbal6093 5 жыл бұрын
Well explained sir.
@ialpha6431
@ialpha6431 5 жыл бұрын
as usual amazing ... you are ..
@GustavoChApaza
@GustavoChApaza 5 жыл бұрын
Good video nice explanation
@opmdevil
@opmdevil 5 жыл бұрын
Very good explanation
@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!
@alokrm
@alokrm 5 жыл бұрын
First session on Java 10 :) thanks
@AhmedRaza-rj8et
@AhmedRaza-rj8et 3 жыл бұрын
Too smart explanation
@lliiiBodyiiill
@lliiiBodyiiill 2 жыл бұрын
Thanks for sharing
@RPRAVEEN14790
@RPRAVEEN14790 4 жыл бұрын
Nice explanation. These features are already there in Scala.
@sureshpal5569
@sureshpal5569 5 ай бұрын
great video
@FavouriteVid
@FavouriteVid 4 жыл бұрын
thank you!
@papachoudhary5482
@papachoudhary5482 5 жыл бұрын
Thanks!
@sahilGupta217
@sahilGupta217 5 жыл бұрын
I got the notification today 🙈
@rameshchowdarykonka5551
@rameshchowdarykonka5551 5 жыл бұрын
Tq.. Sir...
@amitchauhan1505
@amitchauhan1505 3 жыл бұрын
thanks !
@dharmeshpanchal4864
@dharmeshpanchal4864 5 жыл бұрын
Thanks
@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
@alittlecoding
@alittlecoding 3 жыл бұрын
perfect
@kaysiz-zw
@kaysiz-zw 5 жыл бұрын
i enjoy your tutorials, but do you have an introduction to Java for beginners?
@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.
@asifiqbal6093
@asifiqbal6093 5 жыл бұрын
Sir , please provide hadoop tutorial..
@ayanchakraborty7842
@ayanchakraborty7842 5 жыл бұрын
Can you help us with Data structures and algorithms...
@adityashinde3864
@adityashinde3864 5 жыл бұрын
Sir , please makes java course .
@coffecoding
@coffecoding 4 жыл бұрын
Sir, Reactive Programming please
@syedwaseemahmed1749
@syedwaseemahmed1749 5 жыл бұрын
Java there is no ending. Can you please make videos on audit by jpa. Please thank you.
@zyrakia
@zyrakia 4 жыл бұрын
What editor is used in this video for the code?
@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.
@GAMarine137
@GAMarine137 Жыл бұрын
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 7 ай бұрын
Go is bull crap
@cool-aquarian
@cool-aquarian 6 ай бұрын
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.
@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..
@blasttrash
@blasttrash 5 жыл бұрын
cool
@parvezmd6455
@parvezmd6455 5 жыл бұрын
Sir what is bean in spring framework?
@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.
@akshaynaik4888
@akshaynaik4888 5 жыл бұрын
which vs code theme is these?
@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
@prashantshubham
@prashantshubham 4 жыл бұрын
Java generics and Design pattern videos please :)
@M-GD
@M-GD 5 жыл бұрын
Solarized IntelliJ?
@ReshiramR52
@ReshiramR52 5 жыл бұрын
var in Java? I didn't know it was possible
@sujithg5873
@sujithg5873 5 жыл бұрын
It comes java 10
@perschistence2651
@perschistence2651 5 жыл бұрын
I do not understand the "coding to interfaces" part @5:10
@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 :)
@huseyinaydin1002
@huseyinaydin1002 5 жыл бұрын
yok yokluk = null; :D
@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
@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.
@udaisingh8436
@udaisingh8436 9 ай бұрын
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...
@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.😁
@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,
@tenminutetokyo2643
@tenminutetokyo2643 4 жыл бұрын
So now Java, JavaScript and Swift all look the same.
@torchlight6927
@torchlight6927 5 жыл бұрын
What does java think it is, JAVA SCRIPT!!!
@SHSolutions
@SHSolutions 9 ай бұрын
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“?
@Rico-by5zi
@Rico-by5zi 4 жыл бұрын
Bore off
Super Keyword in Java Full Tutorial - How to Use "super"
11:33
Coding with John
Рет қаралды 196 М.
버블티로 체감되는 요즘 물가
00:16
진영민yeongmin
Рет қаралды 107 МЛН
He sees meat everywhere 😄🥩
00:11
AngLova
Рет қаралды 11 МЛН
Дибала против вратаря Легенды
00:33
Mr. Oleynik
Рет қаралды 4,8 МЛН
ОСКАР vs БАДАБУМЧИК БОЙ!  УВЕЗЛИ на СКОРОЙ!
13:45
Бадабумчик
Рет қаралды 2,9 МЛН
What are microservices really all about? - Microservices Basics Tutorial
15:12
Java 8 to 18: Most important changes in the Java Platform
31:24
Java Generics Tutorial
12:23
Keep On Coding
Рет қаралды 180 М.
How to add Swagger to Spring Boot - Brain Bytes
21:09
Java Brains
Рет қаралды 448 М.
Java static keyword ⚡
8:18
Bro Code
Рет қаралды 107 М.
What is OAuth really all about - OAuth tutorial - Java Brains
10:56
Java BlockingQueue
17:48
Jakob Jenkov
Рет қаралды 38 М.
버블티로 체감되는 요즘 물가
00:16
진영민yeongmin
Рет қаралды 107 МЛН