title: Random array-word generator
body: <p>I'm trying to make a random generated array word, i dont find any problems with this code, but it just doesn't run, it doesn't show me the array's word when there is a random generated number. What is wrong with my code? </p>
  
  <pre><code>import java.util.Scanner;
  import java.util.Random;
  
  public class apples{
      public static void main(String[] args){
          Random dice = new Random();
          Scanner scan = new Scanner(System.in);
          String me[] = new String[5];
  
  
          me[0] = "Wow";
          me[1] = "LoL";
          me[2] = "Jis, Ji";
          me[3] = "Mes";
          me[4] = "Jus";
  
  
          System.out.println("Enter YES or NO: ");
          String roll = scan.nextLine();
          String name = "yes";
          if(roll == name){
              int result = dice.nextInt(5);
               if(result == 0){
                   System.out.println(me[0]);
               }else if(result == 1){
                   System.out.println(me[1]);
               }else if(result == 2){
                   System.out.println(me[2]);
               }else if(result == 3){
                   System.out.println(me[3]);
               }else if(result == 4){
                   System.out.println(me[4]);
               }
          }else{
              System.out.println("Bad");
          }
  
          }
  
      }
  </code></pre>