correct method "get next value"
<p>This code isn't working.  Can you help me fix it?</p>

<pre><code>// need to get next parameter
static double getParametr()
{
    Scanner scanner = new Scanner(System.in);
    param = scanner.nextDouble();
    return param;
}
// ...
// ...
if (i==1)
{
    System.out.println("vvedite storoni pryamougolnika:  ");
    Shape parA = new Rectangle();
    parA.a = Shape.getParametr(); --- this is ok
    double aa = parA.a;
    Shape parB = new Rectangle();
    parB.b = Shape.getParametr();  ------ this is no work!!! 
    double bb = parB.b;
    Rectangle rec = new Rectangle(aa, bb);
    arrayFigur[i] = rec.area();
}
</code></pre>
