title: Illegal escape character netbeans
body: <p>I have a programming assignment which requires the code to be single line(shortest code). I did it, but for some reason, I get the error "Illegal Escape Character". Some people say claim that it will not do the same in eclipse. However, I have to turn in NetBeans project.</p>
  
  <p>This is my code:</p>
  
  <pre><code>public class ShortestCode {
      public static void main(String[] args) {
          System.out.println(JOptionPane.showInputDialog("Enter your email address").matches(".*@.*\..*") ? "Address Appears Valid" : "Address is Invalid");
      }
  }
  </code></pre>
  
  <p>What can I do so it is acceptable by NetBeans IDE? All the error saying is "Illegal escape character." and does not provide with any other hints.</p>