Path: csiph.com!xmission!nnrp.xmission!.POSTED.shell.xmission.com!not-for-mail From: nobody@example.org (Scott) Newsgroups: comp.lang.java.programmer Subject: Re: Inclusive or exclusive array Date: Sat, 03 Aug 2019 05:40:39 GMT Organization: XMission http://xmission.com/ Message-ID: <5d451cf1.3109053359@core> References: <87zhkvmqx8.fsf@munus.decebal.nl> <87v9vjmkkn.fsf@munus.decebal.nl> <40442ad6-ade1-41b3-98da-1a01b6d0b7c7@googlegroups.com> <5d44779f.3066731218@core> <377a17ac-80c2-4592-aa1a-716811518e27@googlegroups.com> Injection-Info: news.xmission.com; posting-host="shell.xmission.com:2607:fa18:0:beef::4"; logging-data="2863"; mail-complaints-to="abuse@xmission.com" X-Newsreader: Forte Free Agent 1.21/32.243 Xref: csiph.com comp.lang.java.programmer:39067 On Fri, 2 Aug 2019 10:58:52 -0700 (PDT), Eric Douglas wrote: >On Friday, August 2, 2019 at 1:48:53 PM UTC-4, Scott wrote: >> >substring is a fun animal. I'm used to start position, length from other l= >> >anguages then we get to java with start index, end index. >> >> What make it 'click' for me is when I realized that where other >> languages use {start,len}, Java convention uses {start,start+len}. > >It's also the 0-base vs 1-base. >If you want to parse the "DEF" out of "ABCDEFG" it could reference as (4,3) or (3,6) I haven't seen 1-based indexing in a very long time. Not since I last touched BASIC I think.