Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Contoh Penggunaan Perulangan Do While dalam Java

Perulangan Do While mempunyai syntax Sebagai Berikut :

Do{

<Block of statements>;

}while(<boolean condition>);

Untuk contoh penggunaannya adalah sebagai berikut :



public class DoWhileExample {
public static void main(String[] args) {
int i = 0;
do {
System.out.println("i is : " + i);
i++;
}while(i <= 5);
}
}

Selamat mencoba, semoga membantu...


This post first appeared on Bow's, please read the originial post: here

Share the post

Contoh Penggunaan Perulangan Do While dalam Java

×

Subscribe to Bow's

Get updates delivered right to your inbox!

Thank you for your subscription

×