different types of variables in java string
This section contains the types of variable in java. In Java all variable must be declared before it will be used anywhere in the program. The declaration syntax is as follows : type identifier [ = value][, identifier [= value] ...] ; Here 'type' is data type and 'identifier' is the variable name. Java have following types of variable : Local variables.
Based on the data type of a variable, the operating system allocates memory and decides what can be stored in the reserved memory. Therefore, by assigning different data types to variables, you can store integers, decimals, or characters in these variables. There are two data types available in Java â.