java check if a line is enclosed in quotation marks

Java
String n;
if(n.startsWith("\""))
{
    // execute if true
}
Source

Also in Java: