The Do While Loop in Java

  Рет қаралды 123,631

Neso Academy

Neso Academy

Күн бұрын

Пікірлер: 52
@elisamutiofficial2245
@elisamutiofficial2245 Жыл бұрын
Finally I got clear difference between do while and while loops. Thank you for your support to the entire world
@Anand-im
@Anand-im 4 ай бұрын
appo poi umbu da punda
@mikelk124
@mikelk124 Жыл бұрын
I had 2 do while loops in the same function and kept getting and exception thrown by the second loop. I was confused why the do in the second loop was executing when the logic in the second while was not met. When you explained do while runs once then checks logic, it was a revelation moment. Thank you for saving me from nullpointerexception hell!
@mvs2620
@mvs2620 4 жыл бұрын
Sirr...you are just amazing!!!!... U just cleared my every doubt...
@jlopez8220
@jlopez8220 Жыл бұрын
Great explanations. Straight to the point thank you
@Kim-gf9rr
@Kim-gf9rr 8 ай бұрын
Ay man! I really appriciate your teaching videos. I just want to let u know that keep fighting and keep living. Dont give up! I hope God bless you.
@bsaikumarreddy1413
@bsaikumarreddy1413 4 жыл бұрын
thank you very much... please upload videos fast.. when neso is going to start ds and algorithms
@perigogaming7863
@perigogaming7863 26 күн бұрын
i just love this man
@Bishwasification
@Bishwasification 5 ай бұрын
Really worth it!!. I will give your reference in my school assignments too 💜💜
@techtech9062
@techtech9062 Жыл бұрын
wow best and most clear explanation
@kinghowardmaneclang4440
@kinghowardmaneclang4440 2 жыл бұрын
Would you be able to do an example of do-while loop but instead of integer to terminate the program we use a string to stop the program? e.g. while(i == "stop")
@Grace-oh3rg
@Grace-oh3rg 3 жыл бұрын
wow awesome I really understand everything ! I have an exam on Friday so I will certainly be able to understand the question and do the task on compiler
@brycereece6696
@brycereece6696 3 жыл бұрын
i guess Im randomly asking but does someone know of a way to log back into an instagram account? I was stupid lost my account password. I appreciate any assistance you can give me
@duncanbeckham3453
@duncanbeckham3453 3 жыл бұрын
@Bryce Reece instablaster =)
@brycereece6696
@brycereece6696 3 жыл бұрын
@Duncan Beckham I really appreciate your reply. I got to the site thru google and I'm trying it out atm. I see it takes a while so I will get back to you later with my results.
@brycereece6696
@brycereece6696 3 жыл бұрын
@Duncan Beckham It did the trick and I now got access to my account again. Im so happy! Thanks so much, you saved my ass!
@duncanbeckham3453
@duncanbeckham3453 3 жыл бұрын
@Bryce Reece happy to help =)
@gautamsunal239
@gautamsunal239 11 ай бұрын
i luv ur videos so much!!! the exercises are so useful and ur teaching is to the point thank you sir!
@ௐ_Sri_Murugar_Saranam
@ௐ_Sri_Murugar_Saranam Жыл бұрын
Excellent ...Thanks for you videos..
@akashmapari1127
@akashmapari1127 3 жыл бұрын
Thank you so much sir keep it up please upload videos the descrite mathematics full course
@ljaykhan520
@ljaykhan520 9 ай бұрын
Great tutorial ever👍
@user-tt2th6hp8r
@user-tt2th6hp8r 3 жыл бұрын
thank you so much bro, it was amazing, i appraciate you
@ashleyduffy2088
@ashleyduffy2088 3 жыл бұрын
This was helpful in learning loops but everywhere I go, people use INT. most of my assignments want Strings.
@spencermasauko8442
@spencermasauko8442 5 ай бұрын
You got a new subscriber, thank you
@ArthurAraujo-oo2ll
@ArthurAraujo-oo2ll 2 жыл бұрын
A nice explanation! ty so much
@mbelalhossain3470
@mbelalhossain3470 2 жыл бұрын
excellent explanation.... thanks.
@Bibingka321
@Bibingka321 Жыл бұрын
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner s = new Scanner(System.in); System.out.print("please enter a value between 1 and 10: "); long i = s.nextInt(); do { System.out.print(i + " is wrong please try again: "); i = s.nextInt(); } while (i > 10 || i < 1); System.out.println(i + " is correct"); } } here's mine, a bit different but works the same ^^.
@India_11111
@India_11111 Жыл бұрын
sir i am a lot of learn from you .
@jennincekara1780
@jennincekara1780 2 жыл бұрын
That was amazing thank you
@Ryan-le2im
@Ryan-le2im 4 жыл бұрын
Awesome vid!
@thanhngoc2389
@thanhngoc2389 11 ай бұрын
Thanksssssss
@ananyapanda6238
@ananyapanda6238 2 жыл бұрын
Great
@mraadi6258
@mraadi6258 4 жыл бұрын
WHAT IS THE SYNTAX?
@ayushimukherjee7227
@ayushimukherjee7227 2 жыл бұрын
package ayushi; import java.util.Scanner; public class Main { public static void main(String[] arg) { Scanner intput = new Scanner(System.in); System.out.println("enter your number:"); int a =intput.nextInt(); do{ System.out.println(a + "is in not between 1 and 10"); a =intput.nextInt(); }while (1>a || a>10) ; System.out.println(a + "is in between 1 and 10"); } }
@mihaeljon1737
@mihaeljon1737 10 ай бұрын
what ide do you use?
@wisdomawak592
@wisdomawak592 6 ай бұрын
Intellij idea
@jayanth5032
@jayanth5032 3 жыл бұрын
Sir what if we enter our first number in between 1 and 10 Our program will ask us again to enter a number So we can use if else statements to solve this one In if block write condition as usual In else write do while It gives us effective output
@a.human.
@a.human. 3 жыл бұрын
I just wrote the same program as the tutor in the vid, and entered a number between 1 and 10 in the first go. It didn't ask us "again" to enter a number. Better not to use if / else in this program, as who know in which go will the user enter the right number
@jayanth5032
@jayanth5032 3 жыл бұрын
@@a.human. Using if and else blocks increases the efficiency of program and helps to solve many test cases
@d3monlord_019
@d3monlord_019 3 жыл бұрын
@@jayanth5032 i believe we can it is more efficient to use it in while loop
@Abhisek_03
@Abhisek_03 2 жыл бұрын
hey, i know it's a pretty late reply, but still I wanna say this: if we enter 1st number between 1 and 10, it will not ask for input again cause if the first input is within the range then it will not go into the while loop, it will straight come out of the loop and will print
@jeyamuthu-eo6by
@jeyamuthu-eo6by 2 жыл бұрын
supe explaination
@markov7776
@markov7776 9 ай бұрын
good video , oRayt?
@OpinionOfX
@OpinionOfX 2 жыл бұрын
👍👍
@shahidaibrahim2917
@shahidaibrahim2917 3 жыл бұрын
import java.util.Scanner; public class a{ public static void main(String[]args){ Scanner n=new Scanner(System.in); int input; do { System.out.print("Enter number between 1 and 10 :"); input=n.nextInt(); if(input>1&&input1&&input
@Jeremy-m8r
@Jeremy-m8r 10 ай бұрын
Okau HABIBI
@mohamadwaked7268
@mohamadwaked7268 3 ай бұрын
I cant see the difference its the same
@TrismegistusH
@TrismegistusH 3 ай бұрын
basically the code runs at least once with do while loop. even if condition is false in a regular while loop if the condition is false the code never runs
@shubhammashalkar1977
@shubhammashalkar1977 3 жыл бұрын
nice video but accent was lit
@brocklesnarufcchamp1
@brocklesnarufcchamp1 3 жыл бұрын
That's Arabic accent for you
@zuhoor2000
@zuhoor2000 2 жыл бұрын
can you talk little bet slower plz
The For Loop in Java
8:29
Neso Academy
Рет қаралды 181 М.
why are switch statements so HECKIN fast?
11:03
Low Level
Рет қаралды 419 М.
Когда отец одевает ребёнка @JaySharon
00:16
История одного вокалиста
Рет қаралды 15 МЛН
兔子姐姐最终逃走了吗?#小丑#兔子警官#家庭
00:58
小蚂蚁和小宇宙
Рет қаралды 9 МЛН
Бенчик, пора купаться! 🛁 #бенчик #арти #симбочка
00:34
Симбочка Пимпочка
Рет қаралды 3,6 МЛН
Кәсіпқой бокс | Жәнібек Әлімханұлы - Андрей Михайлович
48:57
While Loop Java Tutorial #37
8:51
Alex Lee
Рет қаралды 316 М.
you will never ask about pointers again after watching this video
8:03
Nested Loops in Java
10:09
Neso Academy
Рет қаралды 282 М.
Java For Beginners: While, Do While & For Loops (7/10)
10:59
Codecourse
Рет қаралды 472 М.
5 Simple Steps for Solving Any Recursive Problem
21:03
Reducible
Рет қаралды 1,2 МЛН
While loops in Python are easy ♾️
6:58
Bro Code
Рет қаралды 389 М.
Multithreading in Java Explained in 10 Minutes
10:01
Coding with John
Рет қаралды 940 М.
Java while loop 🔄
3:37
Bro Code
Рет қаралды 95 М.
Когда отец одевает ребёнка @JaySharon
00:16
История одного вокалиста
Рет қаралды 15 МЛН