Can a for statement loop indefinitely?

Answers were Sorted based on User's Feedback



Can a for statement loop indefinitely?..

Answer / ranganathkini

Yes a for statement can loop infinitely. Example:

for( ; ; ) {
// ..staements to loop
}

Is This Answer Correct ?    10 Yes 0 No

Can a for statement loop indefinitely?..

Answer / guest

yes

Is This Answer Correct ?    7 Yes 1 No

Can a for statement loop indefinitely?..

Answer / ravikiran(aptech mumbai)

yes for(;;)

Is This Answer Correct ?    3 Yes 1 No

Post New Answer

More Core Java Interview Questions

If two threads have same priority which thread will be executed first ?

0 Answers  


Can you write a java class that could be used both as an applet as well as an application?

0 Answers  


What is the difference between an if statement and a switch statement?

0 Answers  


What is an association?

0 Answers  


Differentiate between a constructor and a method? Can we mark constructors final?

0 Answers  






how can you say that java is independ language

2 Answers   TCS, Wipro,


Can you override a private or static method in java?

1 Answers  


What is the difference between notify and notifyall method?

0 Answers  


Is 0 a prime number?

0 Answers  


What is a string what operation can be performed out with the help of a string?

0 Answers  


What is an enumeration class?

2 Answers  


Should database connections be singleton?

0 Answers  


Categories