I tried to replace "-" character in a Java String but is doesn't work :

```
str.replace("\u2014", "");

```

Could you help me ?
['https://Stackoverflow.com/questions/17761717', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1076026/']
String is Immutable in Java. You have to reassign it to get the result back:

```
String str ="your string with dashesh";
str= str.replace("\u2014", "");

```

See the [API](http://docs.oracle.com/javase/7/docs/api/java/lang/String.html#replace%28java.lang.CharSequence,%20java.lang.CharSequence%29) for details.
this simply works.. 

```
    String str = "String-with-dash-";
    str=str.replace("-", "");
    System.out.println(str);

```

output - Stringwithdash