[Solved] substring methods java
String.substring() is a method, not a field, meaning you need to call str.substring() rather than simply str.substring. Further, the substring method takes parameters – you have to tell it the specific substring you want in the form of which indexes within the string. str.substring(0, 2) would print characters 0 and 1 (the upper bound is … Read more