Removing double quotes from a string in Java [closed]

Solution 1:

You can just go for String replace method.-

line1 = line1.replace("\"", "");

Solution 2:

Use replace method of string like the following way:

String x="\"abcd";
String z=x.replace("\"", "");
System.out.println(z);

Output:

abcd

Solution 3:

String withoutQuotes_line1 = line1.replace("\"", "");

have a look here