title: Run time error in java code
body: <p>Hello I am a newbie to java and i am going along alone from a book, wherein there is a code called pharseomatic, which basically selects a random words from a list of word list and prints to the output. </p>
  
  <p>The is as below : </p>
  
  <pre><code>public class phraseomatic{
      public static void main( String[] agrs){
  
              String[] wordlistone = { "Hello ", "whats up ", "How ", " U doing " };
              String[] wordlisttwo = { "I am ", " Am Interseted ", "Learning ", "Java" };
              String[] wordlisttre = { "C sharp ", "C plus plus ", "C and Unix ", "Linux "};
  
              int wlen1 = wordlistone.length;
              int wlen2 = wordlisttwo.length;
              int wlen3 = wordlisttre.length;
  
              int rand1 = (int) ( Math.random() * wlen1 );
              int rand2 = (int) ( Math.random() * wlen2 );
              int rand3 = (int) ( Math.random() * wlen3 );
  
              String phrase = " " + wordlistone[rand1] + wordlisttwo[rand2] + wordlisttre[rand3] ;
              System.out.println("The Result is ---&gt;" + phrase );
      }
  }
  </code></pre>
  
  <p>I was able to compile the code using javac phraseomatic.java command, and everything was good but when i run the code by using command java phraseomatic, I got the following output or errors, please let me know whether I am doing it right or my code is worng or both...? Thanks in advance. The errors is as below :</p>
  
  <pre><code> root@ubuntu:~/java# java phraseomatic 
  
  
       Exception in thread "main" java.lang.UnsupportedClassVersionError: phraseomatic :       Unsupported major.minor version 51.0
          at java.lang.ClassLoader.defineClass1(Native Method)
          at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
          at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
          at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
          at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
          at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
          at java.security.AccessController.doPrivileged(Native Method)
          at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
          at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
  </code></pre>