Solved

Public Class DoWhileExample

Question 33

Essay

public class DoWhileExample
{
    public static void main(String[] args)
    {
int currentValue;
____
____
____
____
____
    }
}
Complete the code above by writing a do…while posttest loop that will output the value of the variable currentValue in a println statement. After the output statement, add a decrement statement to decrease the value of currentValue by 1. Continue the loop until currentValue is equal to 0.

Correct Answer:

verifed

Verified

do
{
  System.out.println(...

View Answer

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions