Responsive Ad Area

Share This Post

test

How does for(;;) work in Java?

I have been doing some Java lately and I found a new way to use infinite for loops for(``).

I know the functionality of a for loop:

Simple for loop

for(initialization; condition ; increment/decrement)
{
   statement(s);
}

Enhanced For loop

for (int num : arr) {
     System.out.println(num);
 }

But since for(;;) is new to me I wanted to know how to use it?

for(;;){
}

Can anyone explain how does it work?


How does for(;;) work in Java?
How does for(;;) work in Java?
test
{$excerpt:n}

Share This Post

Leave a Reply

Your email address will not be Publishedd. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>