title: Creating methods dynamically in a loop
body: <p>I want to do something like this:</p>
  
  <pre><code>for(int i = 0; i&lt;5;i++)
      {
          public void test[i]()
          {
              System.out.println(i);
          }   
      }
  </code></pre>
  
  <p>Can I even create methods like this? I know it requires an array but I have read everywhere about method arrays and it doesn't do it like I want it to.</p>
  
  <p>I don't want to make several methods and then save them in an array, I want to create methods in a loop, and I don't know how to do this.</p>
  
  <p>I need it so I can make as many methods I want of this certain method, instead of writing 100 methods.</p>