java.util.Random r=new java.util.Random(); double a=r.nextFloat()/10.0; h=a;}---------------------This is not a constructor, but a method. It will not be invoked automatically in your program. So the default constructor will intialize the value of "h" to be 0;
java.util.Random r=new java.util.Random();
double a=r.nextFloat()/10.0;
h=a;}---------------------This is not a constructor, but a method.
It will not be invoked automatically in your program. So the default constructor will intialize the value of "h" to be 0;