Search:

Type: Posts; User: Norm

Search: Search took 0.10 seconds.

  1. Thread: Return statement.

    by Norm
    Replies
    18
    Views
    2,199

    [SOLVED] Re: Return statement.

    There is no relationship between returning a value and printing a value. See post #11
  2. Thread: Return statement.

    by Norm
    Replies
    18
    Views
    2,199

    [SOLVED] Re: Return statement.

    One simple thing a return statement allows you to do in a program is to put a method call on the right hand side of an assignment statement.

    variable = aMethod(args); // here the method...
  3. Thread: Return statement.

    by Norm
    Replies
    18
    Views
    2,199

    [SOLVED] Re: Return statement.

    Why is that? Did it work ok?

    For static methods, you don't need to create an object. You could reference your static methods this way:
    int y = JavaObject.factorial(5) + JavaObject.factorial(3);
    ...
  4. Thread: Return statement.

    by Norm
    Replies
    18
    Views
    2,199

    [SOLVED] Re: Return statement.

    Try it and see what happens? Be sure to report back what happens.
Results 1 to 4 of 4