Where a double has not been assigned a value, by default it's value is 0.0d.
The format for declaring a double variable is:
Type identifier;
Where the Type is double and the identifier is weight:
double weight;
...and where a value of 100.50 has been assigned:
double weight = 100.50;
You can declare a double in one statement and assign it a value in another statement:
double weight;
// other statements...
weight = 100.50;
See also:
"Primitive Data Types (The Java™ Tutorials > Learning the Java Language > Language Basics)" ( http://bit.ly/xesQuj )
"Java For Complete Beginners - Double variables" ( http://bit.ly/ZzYTJ9 )