What will be the output of round(3.7) and ceil(3.7)?
Answer / Vishal Nigam
The Math.round() method in Java rounds a number to the nearest integer, while the Math.ceil() method returns the smallest integer that is greater than or equal to the argument. Therefore, round(3.7) would result in 4 and ceil(3.7) would also result in 4.
| Is This Answer Correct ? | 0 Yes | 0 No |
Why are the destructors for base class and derived class called in reverse order when the program exits
What is the protocol is used in type4 driver?
Explain the use of shift operator in java. Can you give some examples?
What is final method?
How do you create an array in java?
If I have 1000 objects and my requirement is to sort them quickly, then which collection would you recommend and why?
What is the applet security manager, and what does it provide?
what is the use of custom tags? with example?
What does the “static” keyword mean?
How can you debug the Java code?
what is connection pooling with example?
How to Sort list of Strings in ascending order without using java api.