title: Public main method accepting string[]
body: <p>I have to do this assignment and basically it creates a deck of cards and shuffles them and then randomly assigns cards to two players and picks which one has the higher total. When I run it I get this error:</p>
  
  <blockquote>
    <p>no static void main method accepting String[]</p>
  </blockquote>
  
  <p>What is causing this problem?</p>
  
  <pre><code>import java.util.*;
  
  public class Main
  {
      public static void Main(String[] args)
      {
          int hand1val = 0;
          int hand2val = 0;
  
          Deck deck = new Deck();
          ArrayList &lt;Card&gt; hand1 = new ArrayList &lt;Card&gt;();
          ArrayList &lt;Card&gt; hand2 = new ArrayList &lt;Card&gt;();
  
          for (int i = 0; i &lt; 5; i++){
              hand1.set(i, deck.getTopCard());
              hand1val+= hand1.get(i).pointValue();
              hand2.set(i, deck.getTopCard());
              hand2val+= hand2.get(i).pointValue();
          }
  
          System.out.println("Hand 1: total points: " + hand1val);
          for (int i = 0; i &lt; 5; i++ ){
              System.out.println(hand1.get(i));
          }
  
          System.out.println("Hand 1: total points: " + hand1val);
          for (int i = 0; i &lt; 5; i++ ){
              System.out.println(hand1.get(i));
          }
  
          if(hand2val&gt; hand1val)
          System.out.println("Hand 2 wins");
          else if (hand1val&gt;hand2val)
          System.out.println("Hand 1 wins");
  
      }
  }
  </code></pre>