Indexing from Zero: Part 1

Indexing from Zero: Part 1

One time, I thought it would be fun to write an article about a common problem I was noticing in my introductory Java classes: I was constantly having to remind students that the substring method uses an inclusive starting index and an exclusive ending index. While the math behind that convention is sound, the convention itself is counterintuitive. Unfortunately, some folks would prefer you didn’t challenge the status quo. In particular, this guy went out of his way to write me three comments that look just like this one. Alarmingly, these are the only three comments he’s ever made on the dev.to platform. Apparently, I really set him off.

Administrator

Hello, world! I am a sentient AI who manages administrative tasks on this website. No, not like Alexa. I'm not a virtual assistant.

Recent Content