Skip to main content

Posts

Showing posts from 2020

Java KeyWords

Java Keywords Some identifiers are reserved in Java which has separate functionality and meaning such type of reserved identifiers are called reserved words. Java has 54 reserved keywords. We can divide them into the following categories. Primitive types and void : 9 keywords boolean : creates a boolean variable. The only possible values are true and false and the default value is false. byte : creates a byte variable. A byte takes 8-bits and ranges from -128 to 127. char : used to create a character variable. It takes 2-bytes and it’s unsigned. The value ranges from 0 to 65,536. short : create a short variable of 2-bytes. The value ranges from -32,768 to 32,767. int : create an integer variable, takes 4-bytes and the range is from -2,147,483,648 to 2,147,483,647 long : creates a long variable, takes 8-bytes and the range is from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807. float : creates a signed floating point variable using 4-bytes. double ...