CST 338 - Week 1 - A Cup of Warm Java
The Coding Bat exercises were a fun way to get reacquainted with some of the basic features of Java. I imagine that going through them over time will help me to get familiar with more advance features and "gotchas" of the language. I would use the example of Java String-1 `withoutEnd` because it led me down an interesting rabbit hole and provided nice value that I will describe here. I have a lot of experience writing Javascript, so the basic prompt seemed very simple: "Given a string, return a version without the first and last char, so "Hello" yields "ell". The string length will be at least 2." Easy enough, I know in Javascript I would use the `slice` method. So I simply looked up what the equivalent would be in Java which was the `substring` method. Using the `.length()` method was familiar to me, so that came naturally -- easy enough right? Well sorta. This is where my rabbit hole came into play. I know that using `.slice()` in Javascript cr...