how can i create a String object from literal ? e.g. i have
String s = " `<div id="top_bin">` ";
this gives an error syntax error on token
how can i create a String object from literal ? e.g. i have
String s = " `<div id="top_bin">` ";
this gives an error syntax error on token
You have to escape the quotes used inside the String
. Use \"
for that:
String s = " <div id=\"top_bin\"> ";
^ ^