Java #32: Continue Statement Example

//Programmer: Akinwale Owi
//Company: Dagba Computers
//Program Purpose: Continue statement example

package dagbacomputers;

/**
*
* @author Akin
*/

//imports
import java.util.Scanner;

public class DagbaComputers {

/**
* @param args the command line arguments
*/
public static void main(String[] args)
{
//variables
int decision, days;

//Scanner
Scanner readInput = new Scanner(System.in);

//Asking user for input 3 times(3 days)
for (days = 0; days 10) continue;

System.out.println(“Drink more water”);

}//end of for statement

//Printed just to test when your loop is done
System.out.println(“Program Done”);

}//end of main

}//End of DagbaComputers Class

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

Up ↑

%d bloggers like this: