title: Radnom cannot be resolved to a type - Typo error in Java itself
body: <p>I have retyped LinkedIn learning material for <a href="https://www.linkedin.com/learning/up-and-running-with-java-2/implementing-file-operations" rel="nofollow noreferrer">Java fortune telling program.</a> </p>
  
  <p>Obviously I do not have typo in random keywords but Java shows runtime error about <strong>Radnom</strong>. Can anybody give me a clue what can cause this error? </p>
  
  <p>Error:</p>
  
  <blockquote>
    <p>Exception in thread "main" java.lang.Error: Unresolved compilation
    problems:</p>
    
    <p>Radnom cannot be resolved to a type</p>
    
    <p>Type mismatch: cannot convert from String to ArrayList    </p>
    
    <p>Syntax error, insert "Finally" to complete TryStatement at customPrograms.FortuneTeller.main(FortuneTeller.java:15)</p>
  </blockquote>
  
  <p>Image proof:</p>
  
  <p><a href="https://i.stack.imgur.com/qSSp0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qSSp0.png" alt="enter image description here"></a></p>
  
  <p>My Code:</p>
  
  <pre><code>package customPrograms;
  import java.util.Random;
  import java.util.Scanner;
  import java.util.ArrayList;
  import java.io.*;
  
  public class FortuneTeller {
  
      public static void main(String[] args) {
          File inputFile = new File("answers.txt");
          ArrayList&lt;String&gt; answers = new ArrayList&lt;String&gt;();
          String answer, response = "y";
          Random rand = new Random();
          System.out.println(rand);
          try {
              Scanner input = new Scanner(inputFile);
              while(input.hasNextLine())
              {
                  answer = input.nextLine();
                  answers.add(answer);
              }
          } catch(Exception e) {
              System.out.println("The input file \"answers.txt\" was not found." );
              System.out.println(e.toString());
          }
  
          Scanner in = new Scanner(System.in);
          while (response.equalsIgnoreCase("y"))
          {
              System.out.println("The fortune teller is ready for you \n"
                      + "Please think about question in your mind \n and hit enter for your reply");
          }
          in.nextLine();
          System.out.println("The fortune teller says: \n" +  answers.get(rand.nextInt(answers.size())) + 
                  "\"\n");
          System.out.println("Do you have another question? (y/n)");
          response = in.nextLine();
      }
  }
  </code></pre>