java - Why doesn't `text.charAt(i+1) <= text.length()` work? -



java - Why doesn't `text.charAt(i+1) <= text.length()` work? -

case 1: if (text1input.charat(i+1) <= text1input.length() && character.isuppercase(text1input.charat(i+1))) { += 60; b += 100; } else { += 55; b += 60; } break;

does line of code create sense? doesn't work how want , can't figure out problem. code meant check next character in string. if character exists (meaning hasn't reached end of string already), , character uppercase, uses these coordinates. else, uses others. problem uses latter regardless of case.

youre comparing character location, might not intended, might utilize i+1 instead of x.charat(i+1)

java if-statement

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -