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

no error if constructor has a return type

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P4 P4
    • None
    • 1.0
    • tools
    • sparc
    • solaris_2.4

      The following class has a method named after the class that should
      be a constructor, but the compiler treats it like a method. This
      should flag an error:

      class test {
          public void test() {
      System.out.println("foo");
          }
      }

            fyellinsunw Frank Yellin (Inactive)
            flar Jim Graham
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: