Java 8 or higher, removing values from char array

domingo :

what would be the least verbose way to remove one item by value from char[] core java 8 > ?

char[] c = new char[] {'a', 'b', 'c'}; 

I want remove 'b' for egz.

ControlAltDel :

Not especially efficient, but certainly not verbose

char[] c = new char[] {'a', 'b', 'c'};
c = new String(c).replace("b","").toCharArray();

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=403838&siteId=1