Search:

Type: Posts; User: javapenguin

Search: Search took 0.10 seconds.

  1. Re: how to read an integer of DOUBLE datatype with type casting

    Perhaps you meant

    c1[i] = new Circle(radius);

    If there is a class called Circle2,

    try type casting it

    cl[i] = (Circle) new Circle2(radius);
  2. Re: how to read an integer of DOUBLE datatype with type casting

    c1[i] = new Circle2((double)radius);

    However, Circle2 isn't defined anywhere.

    Second, why not make radius a double to start with by

    radius = readIn.nextDouble();

    ?
Results 1 to 2 of 2