title: Can’t figure out how to Return a value
body: <p>This will probably will get down voted, so if you do down vote me, can you provided a link to where I can find this?</p>
  
  <p>What am I doing wrong here? I am very new and it seems like this should work. I just don't know what I am doing wrong. This is my error</p>
  
  <pre><code>public class Test
  {
      public static long calculate(long n)
      {   
          n = args[0];
          return n;
      }   
      public static void main(String[] args)
      {       
          long answer;
          answer = calculate();       
      }   
  }
  </code></pre>
  
  <p>Exception:</p>
  
  <pre><code>Test.java:6: error: cannot find symbol
                  n = args[0];
                      ^
    symbol:   variable args
    location: class Test
  Test.java:13: error: method calculate in class Test cannot be applied to given types;
                  answer = calculate() ;
                           ^
    required: long
    found: no arguments
    reason: actual and formal argument lists differ in length
  2 errors
  </code></pre>