function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ 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';