A class is where a program is saved. It's a good practice to name the class based on what it's for, such as BankBalance.
A function is also known as a method. The first function called is always main(), because each Java program needs a place to start. As beginners we'll start by only coding in main, and once we get more familiar with functions, classes, and the keywords that go along with them, we'll start to use other functions and classes more and more.
Names must start with a letter or an underscore. *The others should be alphanumeric.
*Avoid special characters (or basically anything that doesn't fall under the category of "alphanumeric")
Spaces are not allowed.
Names in Java are case sensitive.
Reserved words such as "int" or "class" are not allowed.
*Class names should be nouns with the first letter capitalized, and methods/functions should be verbs written in camelcase. Variables should be nouns as well, and the first letter should be lowercase. These should not start with an underscore or a $.
*One character names should be avoided because they create confusion as to the purpose of the variable.
Anything with a * is technically allowed in Java and should compile fine. However, it is generally a bad practice and should be avoided. Some non-alphanumeric characters are allowed in Java as names, but you will rarely see these.