If you are dealing with char , just do this:
c == '"';
If c is equal to double quotation marks, the expression will evaluate to true .
So you can do something like this:
if(c == '"'){ //it is equal }else{ //it is not }
On the other hand, if you do not have a char variable, but instead of a String object, you should use the equals method and the escape character \ as follows:
if(c.equals("\"")){ //it is equal }else{ //it is not }
Goran jovic
source share