Path: csiph.com!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail From: glen herrmannsfeldt Newsgroups: comp.lang.java.programmer Subject: Re: Help with program Date: Tue, 1 May 2012 19:12:35 +0000 (UTC) Organization: Aioe.org NNTP Server Lines: 16 Message-ID: References: <0d9aaec9-10f1-42b5-af5c-f4d563a934ab@e42g2000yqa.googlegroups.com> NNTP-Posting-Host: H0vc4U5LIRkRHNPyGCs2dA.user.speranza.aioe.org X-Complaints-To: abuse@aioe.org User-Agent: tin/1.9.6-20100522 ("Lochruan") (UNIX) (Linux/2.6.32-5-amd64 (x86_64)) X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.lang.java.programmer:14095 Patricia Shanahan wrote: > On 5/1/2012 10:31 AM, mbuenik5@yahoo.com wrote: >> I need help writing a Java method named swap that takes an integer >> array and two indexes. The method then swaps the integers at those two >> indexes. The return type for swap is void. Can anybody write this out? > I'm sure any who knows Java beyond the extreme beginner level can write > it out. Have you considered the possibility that the objective is to get > you to work out how to do it yourself? That seems likely to me. It is usual that you can get help if you have actually tried, and show what you have and haven't got working. For extra challenge, try doing it without any temporary/local variables. -- glen