0

Can anybody explain new is added in the code?

int sqroot = (int) Math.sqrt(new Double(N));

18th Nov 2017, 10:13 AM
Jayaselvan A K
Jayaselvan A K - avatar
2 Respuestas
+ 1
With 'new' keyword you call the constructor of a particular class. new Double(N) - calls the constructor of the class 'Double' with an argument 'N'.
18th Nov 2017, 12:02 PM
Boris Batinkov
Boris Batinkov - avatar