Charges Nzec Error in Java

Can anyone please tell why am i getting nzec error in the Charges question ?
Pasting my sol link-

In Java string is immutable so I have taken an array.

@darshancool25 Can you have a look please ?

Just rearrange the code to get AC :heavy_check_mark:. Place lines 31- 43 after line 22 :slight_smile:

P.S : You can tag me in a comment under official editorial of the problem (that way relevant discussions remain at one place), no need to create a new Discuss post !!

Thanks a lot !!