What is the difference between math floor and math round?
Answer / Neeraj Nikhra
"The Math.floor() method in Java rounds a number downwards to the nearest integer, while the Math.round() method rounds a number to the closest integer (either up or down depending on the decimal value). For example, Math.floor(5.8) returns 5 and Math.round(5.5) returns 6."
| Is This Answer Correct ? | 0 Yes | 0 No |
What is communist flag?
What are the two types of streams offered by java 8?
what do you mean by classloader?
What is the purpose of the file class in java programming?
What is the difference between error and exception and explain in simple words not whatever is given in the book.
Write the algorithm to check the number non-leaf nodes in a tree.
What are wrapped classes?
How does enum work in java?
How do you do descending order in java?
What will happen if there is a default method conflict as mentioned above and we have specified the same signature method in the base class instead of overriding in the existing class ?
How do you override a method?
what is comparable and comparator interface?