#17 While Loop in Java
ฝัง
- เผยแพร่เมื่อ 8 ก.ย. 2024
- Check out our courses:
Enterprise Java Spring Microservices: go.telusko.com...
Coupon: TELUSKO10 (10% Discount)
Master Java Spring Development : go.telusko.com...
Coupon: TELUSKO20 (20% Discount)
For More Queries WhatsApp or Call on : +919008963671
Udemy Courses:
Spring: go.telusko.com...
Java:- go.telusko.com...
Java Spring:- go.telusko.com...
Java For Programmers:- go.telusko.com...
Python : go.telusko.com...
Git : go.telusko.com...
Docker : go.telusko.com...
website : courses.telusk...
In this lecture we will learn:
- While loop in Java
- When to use the while loop?
- Syntax of while loop
- Nested loops
Loops can be used when we have to repeat something.
#1
While loop:-
- While loop is used with a condition. We need to provide a condition inside the while loop.
- If we will give the condition as true inside the while loop then it will infinite times.
-If we do not provide any condition inside the while loop then it is known as an empty loop.
- We require an iterator inside the loop to execute the statements.
-- We use plus opertaor(+) for concatenation. When we have to concatenate or join two things, we simply use plus operator.
- We need to put the condition inside the while loop for executing statements. We run the loop until the condition gets false.
- When the condition inside the while loops get false, then after that it will not execute the statement of the block and the iterator directly jumps out of the block.
- The while loop is used when the number of iterations is unknown but the terminating condition is known.
- While loop is also an entry-controlled loop as the condition is checked before entering the loop. The test condition is checked first and then the control goes inside the loop.
Syntax of while loop:-
while(condition)
{
statements;
}
#2
Nested loops:-
- We can also use a loop inside another loop statement. A loop inside another loop is known as a nested loop.
- There can be any number of inner loops inside an outer loop.
Github repo : github.com/nav...
Java:- bit.ly/JavaUde...
Spring:- bit.ly/SpringU...
More Learning :
Java :- bit.ly/3x6rr0N
Python :- bit.ly/3GRc7JX
Django :- bit.ly/3MmoJK6
JavaScript :- bit.ly/3tiAlHo
Node JS :- bit.ly/3GT4liq
Rest Api :-bit.ly/3MjhZwt
Servlet :- bit.ly/3Q7eA7k
Spring Framework :- bit.ly/3xi7buh
Design Patterns in Java :- bit.ly/3MocXiq
Docker :- bit.ly/3xjWzLA
Blockchain Tutorial :- bit.ly/3NSbOkc
Corda Tutorial:- bit.ly/3thbUKa
Hyperledger Fabric :- bit.ly/38RZCRB
NoSQL Tutorial :- bit.ly/3aJpRuc
Mysql Tutorial :- bit.ly/3thpr4L
Data Structures using Java :- bit.ly/3MuJa7S
Git Tutorial :- bit.ly/3NXyCPu
Donation:
PayPal Id : navinreddy20
www.telusko.com
Thanks for helping sir, salute for your hardworking to encouraging to us 😇
😂
Great explanation ❤
I learned c first, now Java is very easy for me to understand 😊
Where did u learn c ? Online or offline
Thank you so much sir for this wonderful and amazing java series 😊
Great explanation sir ❤
It extremely helpful.
Sir, Apache Kafka, Dockar aur elastic search in topic pe bhi tutorial bana dijiye
Wonderful session 👍
Thank you so much✨❤🩹
perfect😃Thank you ..
Life me Frist java padhne aya tah channel par 🤔Ab mujhe chakkar aa raha hai 😇😇 ak satha ak din me itna video upload ho gaya kaise padhunga 🤣🤣🤣
Hey Teluska Prabhu 🙏🙏😂
We can perform a cancatination on only string ( if both in string ) we can perform it but in this video i saw " hi " + i but how it is possible sir
We can also perform concatenation operation on a string and a number and on two or more strings its possible .
sir mine just stopped at 124 and i thought may be beacuse of the bits value it may happen , am i correct ?
answer is : Bye 4
😂😂😂
10:28 HAHHAHAH LOVE IT
"with bye, we got five, you know why?"
Hi 5
Please think about me 🤣🤣🤣🙏
man i just realised how slow my computer is
it took my pc a minute to even cross 1 lakh mark while in yours it happened within 5 secs
lol
Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday Sunday i've already mentioned 😂
Tried an infinite loop but doesn't know how to stop the loop, ok my bad.
int i = 3 ;
while(i
int i=1 ;
while(i