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

no error if constructor has a return type

    XMLWordPrintable

Details

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

    Description

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

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: