Это видео недоступно.
Сожалеем об этом.

How to use var keyword in java - Brain Bytes

Поделиться
HTML-код
  • Опубликовано: 16 май 2019
  • 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

Комментарии • 78

  • @vendetta3656
    @vendetta3656 5 лет назад +17

    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.

  • @raviranger52
    @raviranger52 5 лет назад +4

    best explanation .. nothing new though .. this is always the case whenever we have a video from java brains

  • @VIJAYKAUSHIKTYAGI
    @VIJAYKAUSHIKTYAGI 5 лет назад +5

    You produce or of the best technical content. love you , GOD bless you .

  • @javahochzwei9810
    @javahochzwei9810 4 года назад +2

    The introduction of this concept was -imho- a big mistake. Absolut superfluous.. But anyway, you described it absolut perfect!! Thanks for your video

  • @ljka
    @ljka 3 года назад +2

    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 лет назад +2

    As usual great explanation... Thanks for video.

  • @AhmedRaza-rj8et
    @AhmedRaza-rj8et 3 года назад

    Too smart explanation

  • @cesardmora86
    @cesardmora86 5 лет назад +1

    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 года назад +1

      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.

  • @VishalRaoOnYouTube
    @VishalRaoOnYouTube 4 года назад +1

    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.

  • @lliiiBodyiiill
    @lliiiBodyiiill 2 года назад

    Thanks for sharing

  • @palakgupta6435
    @palakgupta6435 5 лет назад +1

    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.

  • @sureshpal5569
    @sureshpal5569 6 месяцев назад

    great video

  • @blackpanther0990
    @blackpanther0990 5 лет назад

    Interesting . Java is becoming cool day by day

  • @kaysiz-zw
    @kaysiz-zw 5 лет назад +1

    i enjoy your tutorials, but do you have an introduction to Java for beginners?

  • @RPRAVEEN14790
    @RPRAVEEN14790 4 года назад

    Nice explanation. These features are already there in Scala.

  • @amanarora2910
    @amanarora2910 5 лет назад +1

    Awesome Explanation!!!

  • @asifiqbal6093
    @asifiqbal6093 5 лет назад +3

    Sir , please provide hadoop tutorial..

  • @xyzabc12342
    @xyzabc12342 5 лет назад

    Thank you koushik for this great video!!!

  • @zulfequar_ali
    @zulfequar_ali 5 лет назад

    Thanks for sharing this knowledge!

  • @syedwaseemahmed1749
    @syedwaseemahmed1749 5 лет назад +1

    Java there is no ending. Can you please make videos on audit by jpa. Please thank you.

  • @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 8 месяцев назад

      Go is bull crap

    • @cool-aquarian
      @cool-aquarian 7 месяцев назад

      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.

  • @sreedharbabu4969
    @sreedharbabu4969 5 лет назад

    Clean and great explanation!!

  • @CodeTechClubHD
    @CodeTechClubHD 5 лет назад

    Explained really well.

  • @alokrm
    @alokrm 5 лет назад

    First session on Java 10 :) thanks

  • @opmdevil
    @opmdevil 5 лет назад

    Very good explanation

  • @asifiqbal6093
    @asifiqbal6093 5 лет назад

    Well explained sir.

  • @sahilGupta217
    @sahilGupta217 5 лет назад +1

    I got the notification today 🙈

  • @GustavoChApaza
    @GustavoChApaza 5 лет назад

    Good video nice explanation

  • @ialpha6431
    @ialpha6431 5 лет назад

    as usual amazing ... you are ..

  • @ayanchakraborty7842
    @ayanchakraborty7842 5 лет назад

    Can you help us with Data structures and algorithms...

  • @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..

  • @amitchauhan1505
    @amitchauhan1505 3 года назад

    thanks !

  • @coffecoding
    @coffecoding 4 года назад

    Sir, Reactive Programming please

  • @udaisingh8436
    @udaisingh8436 11 месяцев назад

    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...

  • @parvezmd6455
    @parvezmd6455 5 лет назад

    Sir what is bean in spring framework?

  • @zyrakia
    @zyrakia 4 года назад

    What editor is used in this video for the code?

  • @dharmeshpanchal4864
    @dharmeshpanchal4864 5 лет назад

    Thanks

  • @FavouriteVid
    @FavouriteVid 5 лет назад

    thank you!

  • @papachoudhary5482
    @papachoudhary5482 5 лет назад

    Thanks!

  • @adityashinde3864
    @adityashinde3864 5 лет назад

    Sir , please makes java course .

  • @alittlecoding
    @alittlecoding 3 года назад

    perfect

  • @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.

  • @rameshchowdarykonka5551
    @rameshchowdarykonka5551 5 лет назад

    Tq.. Sir...

  • @M-GD
    @M-GD 5 лет назад

    Solarized IntelliJ?

  • @akshaynaik4888
    @akshaynaik4888 5 лет назад

    which vs code theme is these?

  • @amanulla5789
    @amanulla5789 5 лет назад +1

    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

  • @perschistence2651
    @perschistence2651 5 лет назад

    I do not understand the "coding to interfaces" part @5:10

  • @ReshiramR52
    @ReshiramR52 5 лет назад +2

    var in Java? I didn't know it was possible

  • @blasttrash
    @blasttrash 5 лет назад

    cool

  • @giovannisardisco4541
    @giovannisardisco4541 5 лет назад

    What JDK version allows this?

    • @marcokapo96
      @marcokapo96 5 лет назад +1

      Java 10

    • @giovannisardisco4541
      @giovannisardisco4541 5 лет назад

      @@marcokapo96 I heard it later, but I keep my comment if somebody else had my doubt :)

  • @nirupam89
    @nirupam89 5 лет назад +1

    Is the following code allowed :
    var i=10;
    i="some string" ;

    • @Java.Brains
      @Java.Brains  5 лет назад +4

      In your mind, replace var with the type on the RHS and you'll have the answer. Which is no.

  • @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.😁

  • @shashidhar71
    @shashidhar71 4 года назад +2

    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

  • @huseyinaydin1002
    @huseyinaydin1002 5 лет назад +1

    yok yokluk = null; :D

  • @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,

  • @paulhetherington3854
    @paulhetherington3854 Месяц назад

    He had, no derivative yet! i = letter not -- any #!

  • @tenminutetokyo2643
    @tenminutetokyo2643 4 года назад

    So now Java, JavaScript and Swift all look the same.

  • @SHSolutions
    @SHSolutions 11 месяцев назад

    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