-2

I have the below data which I want to make as String and I want to keep all spacial character as it is:

, ref : "[REF]", r: "[INSERT_CLICK_TAG]"});

This what I tried but it is giving an error:

String data=", ref : "[REF]",  r: "[INSERT_CLICK_TAG]"});";

How can I make this data into string variable?

Duncan Jones
  • 67,400
  • 29
  • 193
  • 254
Aadi
  • 1,131
  • 2
  • 16
  • 32

1 Answers1

3

You can create as follows:

String data=", ref : \"[REF]\",  r: \"[INSERT_CLICK_TAG]\"});";
Mithun
  • 7,747
  • 6
  • 52
  • 68