Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Scott Dunning Newsgroups: comp.lang.java.programmer Subject: Re: Help understanding methods Date: Sun, 27 Jul 2014 18:56:30 -0700 Organization: A noiseless patient Spider Lines: 40 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Mon, 28 Jul 2014 01:53:56 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="11828741c91d0da908948c6ecdf164c7"; logging-data="24095"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+v02Ev4s19knyMq7FiEI0b0+XTX6jZzDo=" User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 In-Reply-To: Cancel-Lock: sha1:QjcKNxHpVmpOje7wZPxgHlm9sgo= Xref: csiph.com comp.lang.java.programmer:29380 > > 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