• RustyNova@lemmy.world
    link
    fedilink
    arrow-up
    36
    ·
    8 months ago

    Classes often have camelCase or PascalCase. Snake cases often are for variables or functions.

    I don’t remember the java standards, but it’s enough to get it

    • marcos@lemmy.world
      link
      fedilink
      arrow-up
      9
      ·
      8 months ago

      The Java standard is ClassName, variableName, FINAL_VALUE_NAME.

      It’s derived from a popular C++ standard. (But C++ has many for you to pick.)

      Python is the one that likes snake_case, but it’s for variables, as you said. Classes are still PascalCase.

    • bassomitron@lemmy.world
      link
      fedilink
      English
      arrow-up
      6
      arrow-down
      1
      ·
      edit-2
      8 months ago

      In college and workplace, all java projects I ever worked with used camelCase. Whether that’s the official stance of Java or not, I don’t recall.

      • Baut [she/her] auf.@lemmy.blahaj.zone
        link
        fedilink
        arrow-up
        8
        ·
        edit-2
        8 months ago

        But also classes? In Java, I normally see camelcase (objects, variables, functions, …) except for class definitions, which are PascalCase.
        The package itself often is snakecase though iirc?

          • OR3X@lemm.ee
            link
            fedilink
            arrow-up
            1
            ·
            8 months ago

            Same I was taught. Think it’s official. Professor was a stickler for following official rules so I doubt he would deviate.

    • Cosmic Cleric@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      8 months ago

      When you’re telling a joke to a bunch of computer programmer nerds, you got to tell them what programming language the joke is in, or else it just falls flat.