Contoh Penggunaan Do-While loop java coding

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package helloword;

import javax.swing.JOptionPane;

/**
 *
 * @author ADHYSAMSUL
 */
public class cobalaGi {
     private static int a;
    private String[] kata;

         public static void main(String[] args) {
         String kata []={"I think that I shall never see","a poem is lovelly as athree"};
        
    do
    {
 
      // System.out.println(""+ kata[a]);a++;
        JOptionPane.showMessageDialog(null,""+kata[a]);a++;
    }
        
        while(a < kata.length);
         }

    }
Contoh Penggunaan Do-While loop java coding Rating: 4.5 Diposkan Oleh: Adhy

No comments:

Post a Comment