1. A variable name cannot start with a numeral. For instance, 3x or 2goats or 76trombones would all be illegal variable names.
2 You cannot have a mathematical or logical operator in a variable name. For instance, 2*something or this+that would both be illegal… because the * and the + are arithmetic operators. The same holds true for ^, /, \, !, etc.
You can, of course, use what are otherwise keywords as parts of variable names. For instance, thatWindow or someString or theLocation would all be perfectly acceptable.
Posted in: Java