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

no error if constructor has a return type

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Not an Issue
    • Affects Version/s: 1.0
    • Fix Version/s: None
    • Component/s: tools
    • Subcomponent:
    • CPU:
      sparc
    • OS:
      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

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

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: