0
Can anybody explain new is added in the code?
int sqroot = (int) Math.sqrt(new Double(N));
2 Answers
+ 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'.