Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #29293
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.datemas.de!rt.uk.eu.org!aioe.org!.POSTED!not-for-mail |
|---|---|
| From | thinbluernime <thinbluernime3@gmail.com> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: A question about a solution from codingbat.com |
| Date | Fri, 25 Jul 2014 03:52:03 +0000 (UTC) |
| Organization | Aioe.org NNTP Server |
| Lines | 17 |
| Message-ID | <lqsk93$2bo$1@speranza.aioe.org> (permalink) |
| References | <07898d55-9606-44a7-8298-8f5f1c9094c6@googlegroups.com> <53d1a920$0$291$14726298@news.sunsite.dk> <da5efc57-5188-427b-988b-7975d28e7c3f@googlegroups.com> |
| NNTP-Posting-Host | i+hccjf+IDuaX49PUP4Bpw.user.speranza.aioe.org |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Transfer-Encoding | 8bit |
| X-Complaints-To | abuse@aioe.org |
| User-Agent | Opera Mail/12.10 (MacIntel) |
| X-Notice | Filtered by postfilter v. 0.8.2 |
| Xref | csiph.com comp.lang.java.programmer:29293 |
Show key headers only | View raw
On Thu, 24 Jul 2014 18:39:12 -0700, cdalten wrote:
> I don't think your code and his code are doing exactly the same. I would
> expect different results from "axbxxc".
>
> Why does this produce different results?
This version shouldn't:
boolean doubleX(String str) {
for(int i = 0; i < str.length() - 1; i++) {
if(str.charAt(i) == 'x'){
return str.charAt(i+1) == 'x';
}
}//end for
return false;
}
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
A question about a solution from codingbat.com cdalten@gmail.com - 2014-07-24 17:26 -0700
Re: A question about a solution from codingbat.com Arne Vajhøj <arne@vajhoej.dk> - 2014-07-24 20:47 -0400
Re: A question about a solution from codingbat.com cdalten@gmail.com - 2014-07-24 18:39 -0700
Re: A question about a solution from codingbat.com Arne Vajhøj <arne@vajhoej.dk> - 2014-07-24 21:43 -0400
Re: A question about a solution from codingbat.com thinbluernime <thinbluernime3@gmail.com> - 2014-07-25 03:52 +0000
Re: A question about a solution from codingbat.com Joerg Meier <joergmmeier@arcor.de> - 2014-07-25 08:05 +0200
Re: A question about a solution from codingbat.com Leif Roar Moldskred <leifm@huldreskog.lan> - 2014-07-25 01:19 -0500
Re: A question about a solution from codingbat.com rossano.basile@tiscali.it (Rossano Basile) - 2014-07-26 10:05 +0200
Re: A question about a solution from codingbat.com Andreas Leitgeb <avl@auth.logic.tuwien.ac.at> - 2014-07-27 23:02 +0000
csiph-web