↓ 5+10=15
Variable type type
byte: Shorter number (up to about 2 digits)
short: up to 4 digits
int: Numbers up to 9 digits
long: Large number of digits such as world population
float: Floating point. I'm not sure, but I don't really recommend it
double: Floating point. This one seems to be common. The number of digits that can be handled is larger than float.
char: Only one character
String: String
boolean: Boolean value I can't really imagine where to use it.
Variable name rules
-Alphanumeric characters can be used for variable names, but underscores [_] and other symbols other than dollar marks [$] cannot be used.
-Reserved words used in Java cannot be used.
・ You cannot start with numbers.
・ There is no limit to the number of characters
-Case sensitive.
-It is common to use camel case (otherwise Java will not read it)
ex) like telephonNumber, firstName, populationOfWorld
The first letter of the first English word, which has two or more words, is written in lowercase letters, and the first letter of the words after that is written in uppercase letters.
jshell> int y = 10 y ==> 10
jshell> int z = 5 z ==> 5
jshell> System.out.printf("%d + %d + %d = %d", x, y, z, x + y + z).println() 4 + 10 + 5 = 19
jshell> x = 7 x ==> 7
jshell> System.out.printf("%d + %d + %d = %d", x, y, z, x + y + z).println() 7 + 10 + 5 = 22
jshell> y = 66 y ==> 66
jshell> System.out.printf("%d + %d + %d = %d", x, y, z, x + y + z).println() 7 + 66 + 5 = 78
jshell> z = 43 z ==> 43
jshell> System.out.printf("%d + %d + %d = %d", x, y, z, x + y + z).println() 7 + 66 + 43 = 116
jshell> Double d = 3.4 d ==> 3.4