-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
  • 397,926
  • 29
  • 362
  • 485

1 Answers1

2

You have to put the escape character

else if(error.equals("Duplicate entry\"for key \"PRIMARY\""));
Basil Battikhi
  • 2,606
  • 16
  • 31