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

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.

Always type the name of the language after opening your joke block. If your language is known enough, you may have syntax highlighting as well!

@bassomitron@lemmy.world
link
fedilink
English
5
edit-2
7M

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.
link
fedilink
8
edit-2
7M

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?

That’s exactly how I was taught Java styling in college. Idk if it was official styling or just professor preference though.

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

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.

Rust is like Python, but actually tell you the rules instead of you doing whatever you want

Create a post

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.
  • 1 user online
  • 120 users / day
  • 257 users / week
  • 744 users / month
  • 3.72K users / 6 months
  • 1 subscriber
  • 1.48K Posts
  • 32.6K Comments
  • Modlog