what i mean is string is a mobile no which is entered by user.i want to check the length of it so that arrayIndex out of bound exception can be handled.that why i want fetch enterd moblie no and check it's length.
what i m using for this is
Then take the length of the String and use if-else statements as when to call the substring method. The variable length, how do you give it value? Shouldn't be using the String API in order to get the length of the String ?