How to remove specific value from string array in java?
java
Solution
I would do it as follows:
String[] str_array = {"item1","item2","item3"};
List<String> list = new ArrayList<String>(Arrays.asList(str_array));
list.remove("item2");
str_array = list.toArray(new String[0]);
Problem
Possible Duplicate: Removing an element from an Array (Java) How to remove specific String array value for example `String[] str_array = {"item1","item2","item3"};` i want to remove "item2" from str_array pls help me i want output like `String[] str_array = {"item1","item3"};`