简体   繁体   中英

Java adding a double quote to my string

I created a class with 3 Strings .

code part 1:

public static final String GET_BY_QUALIFICATION_PRODUIT = " INNER JOIN rel_qualifications_produit ON rel_qualifications_produit.idqualifications = qualifications.idqualifications WHERE rel_qualifications_produit.idproduit = ? order by order asc";

and i used test attribute in another method .

code part 2:

String s = search + QualificationSQL.GET_BY_QUALIFICATION_PRODUIT;
statement = connection.prepareStatement(s);'

the problem is that test displays ""order by test asc"" and not "order by test asc" .

thanks for helping .

您可以使用replaceAll("\\"", "");String删除双引号字符replaceAll("\\"", "");

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM