If you want an exact match on that line as a String, the equals() method would do it:
aString.equals("print \"hello world1\" .")