penny pitch anyone?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jazzed4jasper
    New Member
    • Jun 2009
    • 4

    #16
    Uh..where do i find that? I'm very confused.

    Comment

    • r035198x
      MVP
      • Sep 2006
      • 13225

      #17
      Originally posted by jazzed4jasper
      Uh..where do i find that? I'm very confused.
      You are not paying attention to the error message.
      You do have some .java files that you are trying to compile, right?
      In those .java files are declarations of classes. Now read the error messages again.

      Comment

      • Markus
        Recognized Expert Expert
        • Jun 2007
        • 6092

        #18
        The class name must be the same as the file it is in.

        You have what appears to be two classes defined in one file, and I'm not sure you can do that in Java. I would say it (my previous statement) with conviction, i.e you cannot declare multiple classes in one file, but I know little about Java, and I'm sure to be corrected by either Jos or r0.

        Comment

        • JosAH
          Recognized Expert MVP
          • Mar 2007
          • 11453

          #19
          Originally posted by Markus
          you cannot declare multiple classes in one file, but I know little about Java, and I'm sure to be corrected by either Jos or r0.
          You can define one public class or interface in a file but you can add many non-public classes and interfaces to it. The name of the file has to be equal to the name of the public class or interface in it.

          kind regards,

          Jos

          Comment

          • jazzed4jasper
            New Member
            • Jun 2009
            • 4

            #20
            ok...i'll try fixing it. Thanks for the help.

            Comment

            • RedSon
              Recognized Expert Expert
              • Jan 2007
              • 4980

              #21
              Originally posted by jazzed4jasper
              Uh..where do i find that? I'm very confused.
              Where do you find the name of the file? Are you sure you should be taking a computer science class? Usually one would need to be somewhat advanced before taking on such a course.

              Comment

              Working...