Computer Science
Distinguish between:
Finite loop and Infinite loop
Java Iterative Stmts
18 Likes
Answer
Finite loop | Infinite loop |
---|---|
It iterates for a finite number of iterations. | It continues iterating indefinitely. |
Example: int i = 1; while(i <= 10) { System.out.println(i); i++; } | Example: int i = 0; while(i <= 10) { System.out.println(i); } |
Answered By
8 Likes
Related Questions
What are the advantages of Scanner Class? Explain.
Distinguish between:
Exit controlled loop and Entry controlled loop
With reference to switch case, explain the following:
(a) Default case
(b) Fall through
What is a token? Explain these methods while reading token from Scanner object.
(a) nextlnt( ) (b) nextDouble( )
(c) next( ) (d) nextLine( )