Society & Lifestyle
|Computing||Share This Page|
Variables and Strings
|by Deepak Chandrasekaran|
In the last article we saw how to assigning values to variables and their respective ranges. Lets try to learn more on variables and strings. Use of variables is a key to efficient coding in any programming language. Variable declaration , if not done properly, can lead to many debugging errors.
Variable Assignment and Initialization
Once you have declared the type of a variable, you are free to initialize it and assign to it some value.
What if you want to multiply 3 x 1.5,Or say, int x double? Will the result be an int or a double or something else?
In Java, there is no variable type called string. However, although Java does not have a built-in String type, it does provide you will a predefined class called String which you can use instead.
|More by : Deepak Chandrasekaran|
|Top | Computing|
|Views: 2596 Comments: 0|