Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #29380

Re: Help understanding methods

From Scott Dunning <scottwd01@gmail.com>
Newsgroups comp.lang.java.programmer
Subject Re: Help understanding methods
Date 2014-07-27 18:56 -0700
Organization A noiseless patient Spider
Message-ID <lr4afk$ngv$1@dont-email.me> (permalink)
References <lr46d1$ub3$1@dont-email.me> <functions-20140728032535@ram.dialup.fu-berlin.de>

Show all headers | View raw


>
>    In the end, it is easier when the layman learns the language's
>    terms! But you need to take your time! Summer courses are often
>    to fast for a human brain to cope with all the information.

Yeah tell me about it!  It's super fast and I feel like I'm falling 
behind.  Just need to study more!

>
>> max3(a, b, c)
> ...
>> public static int max3(int a, int b, int c) {
>
>    This is a method invocation with three arguments and a start
>    of a method declaration with three parameters. At run-time,
>    when the message invocation is being evaluated, each
>    argument value is being stored in the corresponding
>    parameter, and then the body of the method declaration is
>    being executed, and in the end, the value of the return
>    expression becomes the value of the method invocation.
>
Ok cool, this helped a lot!

One more quick question.  My function call is...

int maxValue = max3(a,b,c);

right?

I kinda just added maxValue because nothing was working and I seen a few 
methods being called with an entirely different (variable I guess). 
However, I just reran it without the maxValue part and it ran just fine. 
  Why would you want to create a new what I'm assuming is a variable to 
call your function?

Thanks everyone for all your help!  Not sure what I'd do without you 
guys and gals!

Scott

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Help understanding methods Scott Dunning <scottwd01@gmail.com> - 2014-07-27 17:46 -0700
  Re: Help understanding methods Knute Johnson <eternal@knutejohnson.com> - 2014-07-27 18:13 -0700
    Re: Help understanding methods Scott Dunning <scottwd01@gmail.com> - 2014-07-27 18:19 -0700
      Re: Help understanding methods Knute Johnson <eternal@knutejohnson.com> - 2014-07-27 18:49 -0700
        Re: Help understanding methods Knute Johnson <eternal@knutejohnson.com> - 2014-07-27 21:36 -0700
  Re: Help understanding methods Martin Gregorie <martin@address-in-sig.invalid> - 2014-07-28 01:18 +0000
  Re: Help understanding methods Scott Dunning <scottwd01@gmail.com> - 2014-07-27 18:56 -0700
    Re: Help understanding methods "Chris Uppal" <chris.uppal@metagnostic.REMOVE-THIS.org> - 2014-07-28 12:07 +0100
      Re: Help understanding methods "Chris Uppal" <chris.uppal@metagnostic.REMOVE-THIS.org> - 2014-07-28 12:44 +0100
  Re: Help understanding methods Roedy Green <see_website@mindprod.com.invalid> - 2014-07-28 07:20 -0700
  Re: Help understanding methods Josip Almasi <joe@vrspace.org> - 2014-07-28 21:29 +0200

csiph-web