Iteration statements in java


Question 1: What do you mean by the term iteration statements? Name the iteration statements given in Java.

Question 2: Illustrate the fundamental differences between a while and do-while loop?

Question 3: Explain how many times is the loop body executed in a do loop?

Question 4: How many times is the given loop executed?

int s =0, i= 0;
while (i++<5)
s+=I;

Question 5: How many times is the given loop executed?

int s=0, i =0;
do
s+=i
while (i<5);

Question 6: Write down a program in Java to print the largest even and largest odd number from a list of numbers entered via keyboard. The list terminates as soon as one enters zero (0).

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: Iteration statements in java
Reference No:- TGS08708

Expected delivery within 24 Hours