I'm looking at http://docs.oracle.com/javase/6/docs/api/java/lang/Double.html
I am trying
double b = Math.sqrt(absoluteNumber);
int c = b.intValue();
but I am getting this error:
Factorise.java:13: error: double cannot be dereferenced
int c = b.intValue();
Help please?
double
is not an object, it is a primitive type.
Simply writing (int)b
will do the job.
If you really need a Double
object, you need to construct one.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With