title: Updating old code, but it now has forward declaration errors
body: <p>I'm not very proficient in Java, I'm just getting started. However, the need arose to update someone else's work for my own uses (privately, of course). Once I got started updating the Plugin (this is specifically for a Spigot Minecraft server), I ran into a ton of sloppy code and many, many errors. This one has stumped me as a newbie to the Java scene.</p>
  
  <p>The code is for a Base64 decoder.</p>
  
  <pre><code>private static final char[] map1 = new char[64];
  
  static { int i = 0;
      for (char c = 'A'; c &lt;= 'Z'; c = (char)(c + '\001')) map1[(i++)] = c;
      for (char c = 'a'; c &lt;= 'z'; c = (char)(c + '\001')) map1[(i++)] = c;
      for (char c = '0'; c &lt;= '9'; c = (char)(c + '\001')) map1[(i++)] = c;
      map1[(i++)] = '+';map1[(i++)] = '/';
  
      map2 = new byte['&lt;nonunicodechar&gt;']; // It appears as a square in IntelliJ, assuming it's not unicode (see below)
  
      for (int i = 0; i &lt; map2.length; i++) map2[i] = -1;
      for (int i = 0; i &lt; 64; i++) { map2[map1[i]] = ((byte)i);
    }
  }
  
  public static final byte[] map2;
  </code></pre>
  
  <p>The issues thrown are that map2 is an illegal forward reference, and that 'i' is already defined in scope.</p>
  
  <p>What the <code>byte[''];</code> looks as follows</p>
  
  <p><a href="https://i.stack.imgur.com/Ci6O4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ci6O4.png" alt="Code"></a></p>