title: Life Universe and everything SPOJ Java
body: <p>I am new to SPOJ and just started off with the first problem, <a href="http://www.spoj.com/problems/TEST/" rel="nofollow">Life, the Universe and Everything</a>
  I always see a compilation error when I submit. I do not see any error message when I click the error link. I could not see any compilation error on my system. I cannot see any error in IDEONE. When I download my solution I see a blank java file. </p>
  
  <p>What am I missing ?</p>
  
  <p>Here is sample error link for my solution </p>
  
  <p><a href="http://www.spoj.com/error/12671180" rel="nofollow">Error link</a></p>
  
  <p>Here is my below code in java</p>
  
  <pre><code>import java.io.BufferedReader;
  import java.io.InputStreamReader;
  import java.io.IOException;
  
  public class Main {    
      public static void main(String[] args) {
          try{
              BufferedReader buf = new BufferedReader( new InputStreamReader( System.in ));
              String line ;
              while(  (line = buf.readLine()) != null ){
                  if(!line.equals("42")){
                      System.out.println(line);
                  }else{
                      break;
                  }
              }
          }catch(IOException e){
              System.out.println(e.toString());
          }catch(Exception e){
              System.out.println(e.toString());
          }
  
      }
  
  }
  </code></pre>