package randompadaarray;
public class RandompadaArray {
public static void main(String[] args) {
// TODO code application logic here
String[]names;
names=new String[5];
names[0]="John";
names[1]="Jakson";
names[2]="Michael";
names[3]="Ariana";
names[4]="Grande";
int num=(int) (Math.random()*5);
System.out.println("nama saya adalah"+names[num]);
}
}
No comments