title: Return statement not working when calling another method
body: <p>I have recently started experimenting with the return statement, and I have a small doubt relating to it- When I have a method which calls another method, will the return statement of that method which I am calling be displayed?</p>
  
  <p>Let be give an example to make it clearer-</p>
  
  <pre><code>/** Program to test return statment */
  
  public class Test
  {
     public static void main(int a)
     {
        EvenOrOdd(a);
     }
     private static boolean EvenOrOdd(int a)
     {//I can declare as public and run directly but then what is the point in calling     the method?
        if(a%2==0) 
        {
          System.out.println("The output is true.");//Displays
          return true;//Does not display(As in that window does not pop up with the result.)
        }
        else
        {
          System.out.println("The output is false.");//Displays  
          return false;//Does not display
        }
  
     }
  }
  </code></pre>
  
  <p>If I were to simply remove the main method(or even make the second method public and run that directly), my return statement is displayed however if I attempt to call the method and run the program my return statement isn't displayed.</p>
  
  <p>So is this just a problem I am facing or is it a general rule in Java that the return statement doesn't work when you call another method(which has a return statement)?</p>
  
  <p>If it is the latter, then I apologise, I was not aware of this.</p>
  
  <p>Thanks...</p>
  
  <pre><code>                               ***UPDATE***
  </code></pre>
  
  <p>It seems that nobody has understood what I exactly mean. I will give another example-</p>
  
  <p>Please run this program-:</p>
  
  <pre><code>/** Program to test Return statment;simple program to return sum of two digits */
  
  public class Return_Test
  {
     public static int main(int a,int b)
     {
      return a+b;//What I am lloking for is that box in which this is displayed.
     }
  }
  </code></pre>