If you need to store floating-point values in a program , you must declare variables of type double , just as you previously had to declare variables of type int to write add2integers .
For example , if a valueof type int is passed to a method where the parameter is declared as a double , the integer is converted into the equivalent floating-point value before it iscopied into the parameter variable .