One of the fundamentals of programming is the use of variables .
* The variables allow you to assign a bit of information to a memory space and allow you to manipulate data on the life of its agenda .
* Java has support for variables. However, in Java, the syntax is a little different and there are some issues that you need to address, simply saying that
variable name = value of the variable .
* In Java can be anything variablilizar by name unless they are a “keyword” and only contain characters in the Unicode character set. However, good practice is to use the characters within the ranks of “AZ, az, 0-9, or _”.
* variable names should help you understand what is happening in your program. Therefore, it is helpful to his name variables such as intelligence firstName .
* Note that we’ve created a variable firstName in which the first floor was lower case, the second floor, began with a capital letter and not there are spaces. This is fairly standard practice and is a good habit. In addition, many developers highlighted the use of a private prefix variables such as “_adminName “.
* Because Java is a” strong typing “the type of each variable must be declared .
* For example, in order to make the allocation varies indicated above, it is first necessary to tell the Java compiler that the variable “age” should expect to hold a whole.
* The reason for writing is that Java can manage the use of the computer’s memory when a Java program is running. Each type of variable is allotted a different amount of memory depending on the amount you need. A two-digit integer for example, less space than a 12-digit number. Therefore, when we are writing a variable, what we’re really doing is telling the computer how much memory to make available to the variable value. The benefit of strong is to write Java code that can be easily ported from one machine to another. However, you must be aware that if you choose a variable rate in a way, and then assign a value that can not hold, the value is truncated to fit into the variable and its program will produce incorrect results.
* In Java, there are eight types of variables: int, short, long, byte, float, double, char, and boolean.