import java.util.Random;
public class RandomHuruf
{
public static void main(String[] args)
{
String array[] = {"a", "b", "c", "d", "e", "f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"};
Random r = new Random();
int index = r.nextInt(array.length);
String result = array[index];
System.out.print(" "+result+"\n");
}
}
//use "RandomHuruf" for file name
Ads 970x90
Kamis, 23 Februari 2012
Random Huruf (JAVA)
Related Posts
- import javax.swing.*; import java.awt.*; import java.awt.event.*; class Suhu { &nb
- class Exchange { public static void main(String[] args)
- class BubbleSort { public static int i,j,tampung;
- import javax.swing.*; import java.awt.*; import java.awt.event.*; class Factorial { &nb
- import javax.swing.*; public class Polindrom { public static voi
- class SelectionSort { public static void main(String[] args) &n
Load comments
Langganan:
Posting Komentar (Atom)