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

python - how we can use ajax() in views.py in django? -

matlab - Using loops to get multiple values into a cell -

python - Sequence Pattern recognition with Pybrain -