我看http://docs.oracle.com/javase/6/docs/api/java/lang/Double.html如何在Java中對int進行double操作?
我想
double b = Math.sqrt(absoluteNumber);
int c = b.intValue();
,但我收到此錯誤:
Factorise.java:13: error: double cannot be dereferenced
int c = b.intValue();
幫助嗎?
'int c =(int)b;' – Mysticial
可能重複[如何在Java中將double轉換爲int?](http://stackoverflow.com/questions/2143476/how-to-cast-a-double-to-an-int-in-java) –