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?
doubleis not an object, it is a primitive type.Simply writing
(int)bwill do the job.If you really need a
Doubleobject, you need to construct one.