-4
else if(error.equals("Duplicate entry"for key 'PRIMARY'"));

In the above code, I want to insert the " after entry as a string but it is not letting me to do so, please help.

Willem Van Onsem
  • 443,496
  • 30
  • 428
  • 555

1 Answers1

2

You have to put the escape character

else if(error.equals("Duplicate entry\"for key \"PRIMARY\""));
Basil Battikhi
  • 2,638
  • 1
  • 18
  • 34