title: Illegal start of expression error in Java
body: <p>Here's the code I'm having an issue with:</p>
  
  <pre><code>    class Drunk
  {
          final int N = 5;
          int steps = 0;
          int corner = 5;
  
          public static int drunkWalk()
          {
  
                  System.out.println("Here we go again... time for a walk!");
  
                  do
                  {
                          int lOrR = Math.Random();
                          if (lOrR &lt; 0.5)
                          {
                                  corner++;
                          }
                          if (lOrR &gt; 0.5)
                          {
                                  corner--;
                          }
                          steps++;
                  } while (corner != 0 &amp;&amp; corner != 10);
  
                  if (corner = 0)
                  {
                          System.out.println("Took " + steps +", and");
                          System.out.println("Landed at HOME");
                          System.out.println("");
                  }
                  if (corner = 10)
                  {
                          System.out.println("Took " + steps +", and");
                          System.out.println("Landed at JAIL");
                          System.out.println("");
                  }
  
                  return steps;
          }
  
          public static void main(String[] args)
          {
                  for (int i = 1; i &lt;= N; i++)
                  }
                          drunkWalk();
                  }
  
                  System.out.println("Average # of steps equals " + (steps / N));
          }
  }
  </code></pre>
  
  <p>Here are errors Java complains:</p>
  
  <pre><code>Drunk.java:45: error: illegal start of expression
          }
          ^
  Drunk.java:49: error: &lt;identifier&gt; expected
          System.out.println("Average # of steps equals " + (steps / N));
                            ^
  Drunk.java:49: error: illegal start of type
          System.out.println("Average # of steps equals " + (steps / N));
                             ^
  Drunk.java:49: error: ')' expected
          System.out.println("Average # of steps equals " + (steps / N));
                                                         ^
  Drunk.java:49: error: ';' expected
          System.out.println("Average # of steps equals " + (steps / N));
                                                           ^
  Drunk.java:49: error: &lt;identifier&gt; expected
          System.out.println("Average # of steps equals " + (steps / N));
                                                                  ^
  Drunk.java:49: error: &lt;identifier&gt; expected
          System.out.println("Average # of steps equals " + (steps / N));
                                                                      ^
  Drunk.java:49: error: illegal start of type
          System.out.println("Average # of steps equals " + (steps / N));
                                                                       ^
  Drunk.java:49: error: &lt;identifier&gt; expected
          System.out.println("Average # of steps equals " + (steps / N));
                                                                        ^
  Drunk.java:49: error: ';' expected
          System.out.println("Average # of steps equals " + (steps / N));
                                                                         ^
  10 errors
  </code></pre>
  
  <p>I checked my code many times, but couldn't find what is causing the issue and how to fix it. Could anybody help me?</p>