asked in Java Questions by
0 votes

1 Answer

answered by
Boolean, int, and double are known as primitive or basic data types in java.

Basic data types The basic types in Java such as boolean, int, and double are known as primitive types. The primitive data types cannot be null. When you are defining a variable for int and long; the compiler differentiates it based on the suffix L for long data types. If L is absent then JVM treats it as an integer.
This way, when anyone is reading your code can easily tell the difference between the L and the number 1!
The same rule applies to define floats and doubles data types. The float is defined with F and doubles with D. However if the suffix is not applied then JVM considers it as doubles
0 votes
...