string - Java invalid array size -


I'm taking a string input from the console if I input "ABCD" and so on Dropped

  scanner input = new scanner (System.in); String [] stringInput = input.nextLine (). ToLowerCase (). Trim (). the division (""); Let me assume that I entered  "abcd"  as input, showing  stringInput.length   5 . But, should it be  4  correct? What's wrong, I'm doing here? Any remedy? How can I solve it?   

You can find it in the partitioned method in regex as follows:

 < Code> partition ("(?! ^ ^")   



Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -