-4

i need to replace or remove the single double quote in my string. For ex:- Data"list should be Datalist. Please let me know the solution .

f1sh
  • 11,489
  • 3
  • 25
  • 51
Aaliya
  • 1

1 Answers1

0

Use replace. You need to escape the " since it's used in java as a delimeter to String literals:

String newString = oldString.replace("\"", "");
f1sh
  • 11,489
  • 3
  • 25
  • 51
  • i guess this is to replace pair of double quotes i.e Data""list, but in my case it is Data"list. – Aaliya Feb 04 '19 at 12:17
  • What makes you think this replaces double quotes? Have you tried it? Do you understand what `\"` means? Why do you "guess"? – f1sh Feb 04 '19 at 12:24