Possible duplicate:
In Java, is there a way to write a string literal without the need for quotes?
private static final String CREATE_TABLE_EXHIBITORS = "CREATE TABLE "users" ("_id" text PRIMARY KEY ,"name" text,"body" text,"image" text,"stand_id" text,"begin" long,"end" long,"changedate" long,"website" text,"facebook" text,"myspace" text,"twitter" text,"festivallink" text,"favorite" integer);";
Say I want this query to be a valid string in Java. Do I have to convert it to avoid all double quotes with a trailing slash in front?
eg = "CREATE TABLE \"users"\
Or is there a faster way to make this entire query a valid string at once? I thought you could use single quotes around the entire string to do this, but that doesn't work either.
java escaping
Vincent Jun 08 '11 at 11:21 2011-06-08 11:21
source share