Advertisement
TheSTRIG

compendium giveaway

May 24th, 2015
270
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.58 KB | None | 0 0
  1. import java.util.Random;
  2.  
  3. public class compendium
  4. {
  5.     public static void main(String[] hue)
  6.     {
  7.         compendium panggil = new compendium();
  8.         Random ngasal = new Random();
  9.         int rng = ngasal.nextInt(15);
  10.         System.out.println("Pemenangnya adalah: " + panggil.convert(rng) + " !!");
  11.          
  12.     }
  13.    
  14.     public String convert (int angka)
  15.         {
  16.             String [] terbilang ={"Bang Gen","Renjay","Uqi","Isong","Simaung","Kobam","Dodo","Mullen","Ivan","Rizki","Badar","Edo", "Arip", "Bang Dan", "Agil", "Wandra"};
  17.             String hue = ""+ terbilang[angka];
  18.                
  19.             return hue;
  20.         }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement