title: Class.newInstance() how to use a method?
body: <p>I created an abstract class as follows:</p>
  
  <pre class="lang-java prettyprint-override"><code>abstract class Chance
  {
  
     public void setTeams(SportEvent aSportEvent)
     {
        firstTeam = aSportEvent.getFirstTeam();
        secondTeam = aSportEvent.getSecondTeam();
     }
  
  
     private int totalPlayedGames()
     {
        int playedAtHome = firstTeam.getHomePlayedGames();
        int playedAway = secondTeam.getAwayPlayedGames();
        int playedGames = playedAtHome + playedAway; 
        return playedGames;
     }
  
  
     private int totalScoredGoals()
     {
        int homeScoredGoals = firstTeam.getHomeScoredGoals();
        int awayScoredGoals = secondTeam.getAwayScoredGoals();
        int scoredGoals = homeScoredGoals + awayScoredGoals; 
        return scoredGoals;
     }
  
     abstract double getChance()
  
     Team firstTeam;
     Team secondTeam; 
  }
  </code></pre>
  
  <p>Then, of course, I have several classes with the method <code>getChance()</code>...</p>
  
  <p>Now, I wanted to create a class in which I can get the result of <code>getChance()</code> of these new classes. I thought to use something like:</p>
  
  <pre><code>Class aClass = Class.forName(chanceClass....);
  Object obj = aClass.newInstance();
  </code></pre>
  
  <p>and now I would like to use the 'getChance()' method.</p>
  
  <p>How can I do it?</p>