Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-5099399

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Not an Issue
    • Affects Version/s: 5.0
    • Fix Version/s: None
    • Component/s: tools
    • Labels:
    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      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();
         }

      }

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: