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

Contoh Penggunaan Perulangan While dalam Java

Perulangan bentuk While memiliki syntax Sebagai Berikut

while(<boolean condition>){

<Block of statements>;

}
Contoh penggunaannya adalah sebagai berikut :



public class SimpleWhileLoopExample {
public static void main(String[] args) {
int i = 0;
while(i <= 5) {
System.out.println("i is : " + i);
i++;
}
}
}
Selamat mencoba, semoga membantu.


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

Share the post

Contoh Penggunaan Perulangan While dalam Java

×

Subscribe to Bow's

Get updates delivered right to your inbox!

Thank you for your subscription

×