troubleshooting Question

charAt(index) indexOutOfBoundsException HElp me Catch. Thanks?

Avatar of Dirk6996
Dirk6996 asked on
Java
4 Comments1 Solution266 ViewsLast Modified:
I am trying to find and compare the values of a String by calling the charAt(index) but I am getting an indexOutOfBoundsException when the String ends I want to catch the exception and let the method from which I am invoking the charAt(index) call from end, once it finds the end of the String ie when it says indexOutOfBoundsException. I could catch the exception or write a new charAt() method that overwrites the String method. Help me?
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 4 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros