I want to initialize a String in Java, but that string needs to include quotes; for example: \"ROM\". I tried doing:
\"ROM\"
String value = \" \"ROM\" \
Look into this one ... call from anywhere you want.
public String setdoubleQuote(String myText) { String quoteText = ""; if (!myText.isEmpty()) { quoteText = "\"" + myText + "\""; } return quoteText; }
apply double quotes to non empty dynamic string. Hope this is helpful.