Java uses case in its abcDef functions (camelcase)

Camel Case (or Camel Notation) is the standard and mandatory naming convention in Java syntax for naming most classes, variables, and methods.

  • Upper Camel Case (or Pascal Case)
    • In this variant, the first letter of each word is capitalized.
    • Clases/Interfaces
    • SistemaDeArchivos
  • Lower Camel Case (or Simply Camel Case)
    • The first word begins with a lowercase letter, and subsequent words begin with a capital letter.
    • Methods (Functions), variables
    • nombreCliente

Other Conventions in Java

  • Constants: They are written entirely in capital letters, separating the words with an underscore (_) (known as Screaming Snake Case)
    • PI_VALUE
  • Packages: They are written entirely in lowercase
    • com.miempresa.utilidades

use of double underscores (__var__)

has a specific meaning in C/C++ and Python

(__) at the beginning and/or end of a name

In C and C++, any identifier that begins with an underscore and a capital letter (A) or two underscores (__a) is reserved for use by the compiler or the standard library.

Risk: If you define a variable in the form var or __var, there is a risk that it could collide with an internal variable that the compiler is already using, causing undefined behavior or hard-to-diagnose compilation errors.

The double underscore (var) format is a convention you should avoid in your own code, as it is reserved for internal compiler or system use in C/C++ and other languages.

Python (Dunder/Magic Methods)

In Python, it is called “Dunder” (from Double Under)

It is used for special methods of the class (called “Magic Methods”), such as init, str or add