In String new Line char works fine but its unicode equivalent '\u000A' fails

XMLWordPrintable

    • Type: Bug
    • Resolution: Not an Issue
    • Priority: P4
    • None
    • Affects Version/s: 5.0
    • Component/s: tools
    • generic
    • generic

      Please try compiling the sample program below:-

      public class Test2 {
         
         public void check() {
          // works fine
          String str1 = "\n";
         // leads to compilation failure
          String str2 = "\u000A";
             
         }

         public static void main(String args[]) {
             Test2 ref = new Test2();
             ref.check();
         }

      }

            Assignee:
            Peter Ahe
            Reporter:
            Jit Singh (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: