title: I'm getting <Identifier> expected error
body: <p>In one class, I have a method:</p>
  
  <pre><code>public void initalizeElements()
  {
  //does some stuff
  }
  </code></pre>
  
  <p>So then in another class I try:</p>
  
  <pre><code>Molecules mol = new Molecules();
  
  mol.initalizeElements();
  </code></pre>
  
  <p>and I get an error on the second line saying " expected".</p>
  
  <p>I feel like this is really easy and I'm just glancing over something simple, but I still can't figure it out. And before someone says it, yes I looked at the hundreds of other questions that have the same question as I do. But none of them seemed to help me.</p>
  
  <p>Full Code:</p>
  
  <pre><code>package mymolecules;
  public class Molecules 
  {
          public String[] elements = new String[35];
          private int lazyCounter = 0;
  
          public void initalizeElements()
          {
          elements[lazyCounter] = "H";
          lazyCounter += 1;
          elements[lazyCounter] = "He";
          lazyCounter += 1;
          elements[lazyCounter] = "Li";
          lazyCounter += 1;
          elements[lazyCounter] = "Be";
          lazyCounter += 1;
          elements[lazyCounter] = "B";
          lazyCounter += 1;
          elements[lazyCounter] = "C";
          lazyCounter += 1;
          elements[lazyCounter] = "N";
          lazyCounter += 1;
          elements[lazyCounter] = "O";
          lazyCounter += 1;
          elements[lazyCounter] = "F";
          lazyCounter += 1;
          elements[lazyCounter] = "Ne";
          lazyCounter += 1;
          elements[lazyCounter] = "Na";
          lazyCounter += 1;
          elements[lazyCounter] = "Mg";
          lazyCounter += 1;
          elements[lazyCounter] = "Al";
          lazyCounter += 1;
          elements[lazyCounter] = "Si";
          lazyCounter += 1;
          elements[lazyCounter] = "P";
          ....
          ....
          //on so on for the hole periodic table
          }
  }
  </code></pre>
  
  <p>and</p>
  
  <pre><code>package mymolecules;
  public class Parser 
  {
      private String conString = "";
      private int conInt = 0;
      private int indexer = 0;
  
      private int lazyCounter = 0;
  
      private String sortList = "";
      private int sortCount = 0;
  
      Molecules mol = new Molecules();
  
      mol.initalizeElements();
  
  
      private String formula;
      public Parser(String Formula)
      {
          this.formula = Formula;
      }
      public void Sort()
      {
      while (lazyCounter &gt; 34)
      {
          try {
          if (formula.contains(mol.elements[lazyCounter])) //Does the String contain the letter "H"
          {
              indexer = formula.indexOf(mol.elements[lazyCounter]); //indexer = where in the String "H" is located.
              if (formula.substring(indexer+1,indexer+2).matches("e")) //if "e" is located right after "H"
                      {
                          //System.out.println("Skip"); //Skipping because we'll deal with it later
                      }
              else
              {
                 if (formula.substring(indexer+1,indexer+2).matches("[1-999].*")) // if any number is located after H
                 {
                     conString = formula.substring(indexer+1,indexer+2); //Take the number after "H" and put it in conString
                     conInt = Integer.parseInt(conString); //conInt = ConString as an Integer
                     System.out.println("H"+conInt); //Print out "H" and the number
                 }
                 else
                 {
                     System.out.println(mol.elements[lazyCounter]);
                 }
              }   
          }
          }
          catch (java.lang.StringIndexOutOfBoundsException e) //Catches the error from earlier
          {
              System.out.println("Whew caught an error!"); //rest of this is self explanitory.
              System.out.println(mol.elements[lazyCounter]);
          }
          lazyCounter += 1;
      }
      }
  
  
  }
  </code></pre>