The For Loop in Java

แชร์
ฝัง
  • เผยแพร่เมื่อ 18 มี.ค. 2020
  • Java Programming: The For Loop in Java Programming
    Topics Discussed:
    1. The for loop.
    2. For loop vs. while loop.
    3. Infinite for loop.
    4. How to use a for loop just like a while loop.
    Follow Neso Academy on Instagram: @nesoacademy (bit.ly/2XP63OE)
    Contribute: www.nesoacademy.org/donate
    Memberships: bit.ly/2U7YSPI
    Books: www.nesoacademy.org/recommende...
    Website ► www.nesoacademy.org/
    Forum ► forum.nesoacademy.org/
    Facebook ► goo.gl/Nt0PmB
    Twitter ► / nesoacademy
    Music:
    Axol x Alex Skrindo - You [NCS Release]
    #JavaByNeso #JavaProgramming #ForLoop

ความคิดเห็น • 95

  • @cra_zy.cherry3330
    @cra_zy.cherry3330 3 ปีที่แล้ว +22

    Sir, you are teaching better than my teacher

  • @fidelcastro8276
    @fidelcastro8276 2 ปีที่แล้ว +55

    Just have to say, you're a legend. Thanks for all the videos brother! You are helping a student in need.

    • @RandyDaGamer
      @RandyDaGamer 2 หลายเดือนก่อน

      Indeed. He’s helping a lot of students. He’s a good man.

    • @RandyDaGamer
      @RandyDaGamer 2 หลายเดือนก่อน

      You’re good at explaining. Concise and articulate.

  • @fabnsavvy
    @fabnsavvy 10 หลายเดือนก่อน +9

    I am learning Loops right now and I thank you for explaining so well!

  • @professionalprogrammer3324
    @professionalprogrammer3324 3 ปีที่แล้ว +32

    I am understanding these concepts easily after learning C

  • @sdilip5464
    @sdilip5464 11 หลายเดือนก่อน +4

    thanks thanks thanks a lot these videos are a lot a lot clear and detailed the coomparision u did here is just awesome . we truly need this kind of videos

  • @ramseycarolus206
    @ramseycarolus206 หลายเดือนก่อน

    I've been on for loops for almost 2 weeks now. You sir explained it brilliantly. I felt like a genius when the light bulb went on 😄.

  • @ashChad
    @ashChad 3 ปีที่แล้ว +8

    a better example of for loop than I got at uni........thanks bro

  • @najibassaadi5598
    @najibassaadi5598 2 ปีที่แล้ว +5

    Great explanation!!! Thanks for helping me understand better!!!

  • @cristianvillalobos7701
    @cristianvillalobos7701 ปีที่แล้ว +2

    incredibly thorough video. Thank you!!

  • @jimcarryomambak7871
    @jimcarryomambak7871 ปีที่แล้ว +4

    damn I never even thought that I could understand loop in just 8 minutes, better than my prof

  • @florenti1529
    @florenti1529 2 ปีที่แล้ว +4

    Great explanation, excellent work.

  • @yasodyapanditha5071
    @yasodyapanditha5071 ปีที่แล้ว +1

    Well explained .Thank you .keep it Up !

  • @user-pn4xw9xs3y
    @user-pn4xw9xs3y 5 หลายเดือนก่อน +1

    That is best explanation I have ever seen

  • @sithumdilshan5878
    @sithumdilshan5878 3 ปีที่แล้ว +1

    Thank you so much this helps me lot

  • @zain2895
    @zain2895 8 หลายเดือนก่อน

    Such a life saver!!! THANK YOU THANK YOU THANK YOU

  • @nishak6826
    @nishak6826 ปีที่แล้ว +1

    Great sir. Really useful

  • @ghita2003able
    @ghita2003able 2 ปีที่แล้ว

    Best explanations !

  • @njabznmasikane359
    @njabznmasikane359 2 หลายเดือนก่อน

    Thanks so much!

  • @ControllerCrusade675
    @ControllerCrusade675 2 ปีที่แล้ว +1

    this helps a lot

  • @4ce893
    @4ce893 16 วันที่ผ่านมา

    simply legendary.

  • @Midy755
    @Midy755 2 ปีที่แล้ว

    Best explanation ever!

  • @pudabear4765
    @pudabear4765 ปีที่แล้ว

    great video! thank you

  • @Noahmurphy518
    @Noahmurphy518 ปีที่แล้ว

    Thank you pal! God bless you

  • @BituKumar-fn4fe
    @BituKumar-fn4fe 19 วันที่ผ่านมา

    Helpful

  • @deepositive
    @deepositive 2 ปีที่แล้ว +1

    Tq..you made it more easier

  • @khaniesmakeuptutorials8649
    @khaniesmakeuptutorials8649 10 หลายเดือนก่อน

    Thank you so much for teaching you're amazing and may Allah bless you Jazakallah

  • @ishakeshri4849
    @ishakeshri4849 ปีที่แล้ว

    Well explain thnku for this video

  • @ruthiie.y8696
    @ruthiie.y8696 หลายเดือนก่อน

    Wonderful ✨🙏🏾

  • @gyangaha109
    @gyangaha109 3 ปีที่แล้ว

    Thank you.

  • @miragon1768
    @miragon1768 ปีที่แล้ว

    "As you can see" gets me too much🤣 though thank you for making it easy to understand!

  • @squeekygee8322
    @squeekygee8322 ปีที่แล้ว +1

    thank you.

  • @sanjubhaskar7744
    @sanjubhaskar7744 5 หลายเดือนก่อน

    Thanks, I got it so nicely😊😉

  • @st4yclutch391
    @st4yclutch391 ปีที่แล้ว

    Thanks

  • @adityaWZM
    @adityaWZM 4 หลายเดือนก่อน

    incredible video

  • @rodicaidu2166
    @rodicaidu2166 5 หลายเดือนก่อน

    you explain better than my professor, thank you

  • @ljaykhan520
    @ljaykhan520 6 หลายเดือนก่อน

    A great video ❤

  • @whatsapwhatsapp662
    @whatsapwhatsapp662 4 ปีที่แล้ว

    thx

  • @richatiwari7383
    @richatiwari7383 2 ปีที่แล้ว +1

    You are just awesome!! 😭

  • @arunks8162
    @arunks8162 ปีที่แล้ว

    thanks man

  • @lyncker3343
    @lyncker3343 8 หลายเดือนก่อน

    Excellent discusssion it was really clear. tho at 7:05 will adding a return i; to the body of the loop be redundant or add no additional value?

  • @madikarim264
    @madikarim264 9 หลายเดือนก่อน

    Right!

  • @joshuaokafor8899
    @joshuaokafor8899 2 ปีที่แล้ว

    Bro!!!!!! your too good

  • @theakshatgupta_
    @theakshatgupta_ ปีที่แล้ว

    Excellent Explaination

    • @topperexam1826
      @topperexam1826 หลายเดือนก่อน

      Why out put is hello 6

  • @thesupergamer5894
    @thesupergamer5894 4 หลายเดือนก่อน

    I missed class the day we went over this, and was totally confused about how this worked... now that I see it, I feel stupid for not understanding it sooner

  • @Empower_UU
    @Empower_UU ปีที่แล้ว

    I don;t know what to say. Very helpful indeed

  • @khaledalsayeh1231
    @khaledalsayeh1231 2 ปีที่แล้ว

    Are there power point documents for subscribers on the site ?

  • @maithilykutty1945
    @maithilykutty1945 3 ปีที่แล้ว

    nice❤️👍

  • @parbatbudha1150
    @parbatbudha1150 4 ปีที่แล้ว +2

    can we d use float/double variable for looping purpose ???

    • @theblindprogrammer
      @theblindprogrammer 3 ปีที่แล้ว +1

      double[] inches = {1.3,4.2,59.4, 112.9, 88.7};
      float[] bigNumbers = {1000000000,2000000000, 300000000, 400000000};
      System.out.printf("%4s%15s", "Index", "Value");
      System.out.println();
      for (int i = 0; i < bigNumbers.length;i++){
      System.out.printf("%4s%16s
      ", (i+1), bigNumbers[i]);
      }
      for (int i = 0; i < inches.length;i++){
      System.out.printf("%4s%16s
      ", (i+1), inches[i]);
      }

  • @mr.shuklashukla3259
    @mr.shuklashukla3259 4 ปีที่แล้ว +1

    Sir..
    I'm doing BTech form electronic and communications branch but I interested in android devlopment that's why I'm learning java but I confused that what i learn first opps or core java ,and i have no programing experience instead of c language .
    Plz sugges me .. and also sugges if you have any playlist related to opps or core .
    And I'm watching your java playlist sir your teaching style is very osm And you are great sir 💝😍

    • @theblindprogrammer
      @theblindprogrammer 3 ปีที่แล้ว +1

      If you are good at C, Java will be very easy for you. Learn Core Java first, like Primitives, Objects, Classess, Inheritance, Data structures, and those stuff. It will take you couple weeks since you know C. If you have any challenging questions about Java, please post, I might be able to help you.

    • @professionalprogrammer3324
      @professionalprogrammer3324 3 ปีที่แล้ว

      If you want to learn Java ..First u need to learn the OOP's and then go for core Java ..it might be easy for u if u have knowledge in C..

  • @souparno5065
    @souparno5065 ปีที่แล้ว +1

    7:25 i have a problem like if i want to print "Hello" say, 15 times how do i do it?
    i wrote the code as: for( ; i

    • @suswithcherry9252
      @suswithcherry9252 6 หลายเดือนก่อน

      if you are using a condition then the variable should be initialized first.

  • @ashraf6850
    @ashraf6850 4 ปีที่แล้ว +2

    Data type variable:type

  • @Altair.1187
    @Altair.1187 6 หลายเดือนก่อน

    ++i != i++ my friend, in Java the precedence starts from left to right, so ++i means that i will be incremented by one and then used in the equation, i++ means you'll use the old i first in the equation then get it incremented by 1.

    • @LearnJava_Programming
      @LearnJava_Programming 6 วันที่ผ่านมา

      True but that's in an equation. If you're looking at i++ as itself it is the same as ++i, both will increase i by 1. In an equation, it matters because the i value used might be different.

    • @Altair.1187
      @Altair.1187 6 วันที่ผ่านมา

      @@LearnJava_Programming So you are proving what I was saying, they are not the same.

    • @LearnJava_Programming
      @LearnJava_Programming 6 วันที่ผ่านมา

      @@Altair.1187 true but only in an equation.

  • @user-mq2co8gu7d
    @user-mq2co8gu7d 9 หลายเดือนก่อน

    ur explanation is Fucking incredible

  • @sachithrawijesundara8841
    @sachithrawijesundara8841 3 ปีที่แล้ว +1

    Superb..

  • @charlieagyei2925
    @charlieagyei2925 ปีที่แล้ว +1

    Very good tutorial. but the output "Hello" will be printed five times not six times.

    • @yvngrxxd9078
      @yvngrxxd9078 ปีที่แล้ว

      Yes hello will be printed five times, but it was print ( " hello " + I) where I = 6. It's because when it reached 6 in the loop, the loop stopped printing stuff

  • @ashraf6850
    @ashraf6850 4 ปีที่แล้ว

    Make a video for each loop

    • @theblindprogrammer
      @theblindprogrammer 3 ปีที่แล้ว

      Yes, for each loop is shorter form of the long for loop. Here is an example
      String[] names = {"Bob", "John", "Adam", "Sarah"};
      // long for loop
      System.out.printf("%4s%15s
      ", "Index", "Name");
      System.out.println();
      for (int i = 0; i < names.length;i++){
      System.out.printf("%4s%15s
      ", i, names[i]);
      }
      // For each form
      for (String name : names ){
      System.out.println("Name: " + name);
      }

  • @Swagway177
    @Swagway177 ปีที่แล้ว

    Idk how to say Thank You, but thanks well explained

  • @normangasan
    @normangasan 4 ปีที่แล้ว +1

    Thanks, but I have exam on April 1, please download videos before it🥺

    • @theblindprogrammer
      @theblindprogrammer 3 ปีที่แล้ว

      What problems do you have?

    • @normangasan
      @normangasan 3 ปีที่แล้ว

      The Blind Programmer I already done with exams, passed from all, thanks for asking🥳

    • @theblindprogrammer
      @theblindprogrammer 3 ปีที่แล้ว

      @@normangasan Good to hear, I just wanted to help. If you have any Java-related question/challange feel free to ask.

  • @ritwiksaha8024
    @ritwiksaha8024 4 ปีที่แล้ว +1

    can you please make a video on "for each " loop.....????

    • @theblindprogrammer
      @theblindprogrammer 3 ปีที่แล้ว

      Yes, for each loop is shorter form of the long for loop. Here is an example
      String[] names = {"Bob", "John", "Adam", "Sarah"};
      // long for loop
      System.out.printf("%4s%15s
      ", "Index", "Name");
      System.out.println();
      for (int i = 0; i < names.length;i++){
      System.out.printf("%4s%15s
      ", i, names[i]);
      }
      // For each form
      for (String name : names ){
      System.out.println("Name: " + name);
      }

    • @Arfisto
      @Arfisto 3 ปีที่แล้ว

      You can find it on arfisto! Wish you happy learning

    • @melitajm4286
      @melitajm4286 9 หลายเดือนก่อน +1

      ​@@theblindprogrammercan u say which programming language u have used here ?

    • @melitajm4286
      @melitajm4286 9 หลายเดือนก่อน

      In java
      for(int i = 0 ; i

    • @theblindprogrammer
      @theblindprogrammer 9 หลายเดือนก่อน

      @@melitajm4286 I used Java, which language do you want me to write?

  • @munamuntipback
    @munamuntipback 10 หลายเดือนก่อน

  • @dinorossi6611
    @dinorossi6611 2 ปีที่แล้ว

    Gotta love that heavy Arabic accent.

  • @juanperez-iz7lc
    @juanperez-iz7lc ปีที่แล้ว

    Better then Cydeo...

  • @geektoys370
    @geektoys370 3 หลายเดือนก่อน

    We open braces😬

  • @Altair.1187
    @Altair.1187 6 หลายเดือนก่อน

    Java will be free.