title: What does public static void mean? What is a class?
body: <p>I just accepted that all my programs I made have to start with this. Then I was looking at a example #2 <a href="http://www.javapractices.com/topic/TopicAction.do?Id=62" rel="nofollow" title="here">here</a> regarding generation of a random number.</p>
  
  <pre><code>import java.util.Random;
  
  /** Generate random integers in a certain range. */
  public final class RandomRange {
  
    public static final void main(String... aArgs){
      log("Generating random integers in the range 1..10.");
  
      int START = 1;
      int END = 10;
      Random random = new Random();
      for (int idx = 1; idx &lt;= 10; ++idx){
        showRandomInteger(START, END, random);
      }
  
      log("Done.");
    }
  
    private static void showRandomInteger(int aStart, int aEnd, Random aRandom){
      if (aStart &gt; aEnd) {
        throw new IllegalArgumentException("Start cannot exceed End.");
      }
      //get the range, casting to long to avoid overflow problems
      long range = (long)aEnd - (long)aStart + 1;
      // compute a fraction of the range, 0 &lt;= frac &lt; range
      long fraction = (long)(range * aRandom.nextDouble());
      int randomNumber =  (int)(fraction + aStart);    
      log("Generated : " + randomNumber);
    }
  
    private static void log(String aMessage){
      System.out.println(aMessage);
    }
  } 
  </code></pre>
  
  <p>I noticed that this had a public static void and a private static void. Why not just combine the code into one thing under public static void? More importantly, what do these mean? I did research and saw the word "class" pop up often. What is a class? I hope my question meets the guidelines, this is my first time posting here. Thanks.</p>