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

[lworld] Javac fails to compile V?[].class

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • repo-valhalla
    • repo-valhalla
    • tools

          public static void main(String[] args) {
              System.out.println(MyValue1?[].class);
          }

      Test.java:39: error: illegal start of expression
              System.out.println(MyValue1?[].class);
                                          ^
      Test.java:39: error: illegal start of expression
              System.out.println(MyValue1?[].class);
                                           ^
      Test.java:39: error: <identifier> expected
              System.out.println(MyValue1?[].class);
                                             ^
      Test.java:39: error: not a statement
              System.out.println(MyValue1?[].class);
                                            ^
      Test.java:39: error: ';' expected
              System.out.println(MyValue1?[].class);
                                                  ^
      5 errors

            sadayapalam Srikanth Adayapalam (Inactive)
            thartmann Tobias Hartmann
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: