+ Start a Discussion
vinayakamurthy15vinayakamurthy15 

Invalid string literal 'aa\aa' Ilegal character sequence '\a' in string literal

I am taking String s ='aa\aa'; and tried to run in developer console, it shows the following error as Invalid string literal 'aa\aa'. Illegal character sequence '\a' in string literal.,,  but i want to save this in object as a record .. how can i do that? 

Deepa.B.AnkaliDeepa.B.Ankali
@vinayakamurthy,

Try this,

String s ='aa'+'\\'+'aa';