Java Primitives Keywords
Java Primitives Keywords
1. int:
2. float:
3. double:
- Used to store decimal numbers with double precision (more accurate)
Keywords are reserved words that have a predefined meaning in Java. They cannot be used as
variable names.
Examples:
3. static - Indicates that a method or variable belongs to the class, not instances. Example: static
int count;
4. void - Specifies that a method does not return a value. Example: public void main() { }