fork(1) download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4.  
  5. import java.lang.*;
  6.  
  7. import java.io.*;
  8.  
  9. /* Name of the class has to be "Main" only if the class is public. */
  10.  
  11. class Ideone
  12.  
  13. {
  14.  
  15. public static void main (String[] args) throws java.lang.Exception
  16.  
  17. {
  18. //Random rand = new Random();
  19. // Random R = new Random();
  20. // int rand = rand.nextInt(1.23,1.34,1.45,1.56,1.67,1.78,1.89,2.00,2.12,2.23);
  21. // String R = R.RandomString("jolly rancher", "lolipop","carmael candy","twizlers","sour patch","kitkat","gummies","skittles","milkyway","fuzzy peaches");
  22. String[] candy = new String[]{"jolly rancher", "lolipop","carmael candy","twizlers","sour patch","kitkat","gummies","skittles","milkyway","fuzzy peaches"};
  23. double[] candyprice = new double[]{1.23,1.34,1.45,1.56,1.67,1.78,1.89,2.00,2.12,2.23};
  24. System.out.println("the price of " + candy[0] + " is " + candyprice[0]);
  25. }
  26.  
  27. }
  28.  
Success #stdin #stdout 0.21s 56092KB
stdin
Standard input is empty
stdout
the price of jolly rancher is 1.23