How is rounding performed under integer division?

Answers were Sorted based on User's Feedback



How is rounding performed under integer division?..

Answer / divya

the fractional part of the result is truncated .this is
known as rounding toward zero.

Is This Answer Correct ?    1 Yes 0 No

How is rounding performed under integer division?..

Answer / satya

We can use java.lang.Math.ceil() and java.lang.Math.floor()
methodes in order for rounding numbers.

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More Core Java Interview Questions

84. try { 85. ResourceConnection con = resourceFactory.getConnection(); 86. Results r = con.query(”GET INFO FROM CUSTOMER”); 87. info = r.getData(); 88. con.close(); 89. } catch (ResourceException re) { 90. errorLog.write(re.getMessage()); 91. } 92. return info; Which is true if a ResourceException is thrown on line 86? 1 Line 92 will not execute. 2 The connection will not be retrieved in line 85. 3 The resource connection will not be closed on line 88. 4 The enclosing method will throw an exception to its caller.

1 Answers  


Explain the protected field modifier?

0 Answers  


What is the order of method invocation in an Applet?

1 Answers  


what is a package?

11 Answers  


Describe different states of a thread.

0 Answers  






What is mean by collections in java?

0 Answers  


how cani read a command line argument?(usingfile object).

3 Answers  


Define "Access specifiers" in java.

0 Answers   HCL,


Is null a value?

0 Answers  


What is the output of the following Java program? class Main { public static void main(String args[]){ final int i; i = 10; System.out.println(i); } } 10. What is the output of the following Java program? class Main { public static void main(String args[]){ final int i; i = 10; System.out.println(i); } }

1 Answers  


Where pragma is used?

0 Answers  


wHAT IS DEFAULT SPECIFIER IN JAVA wHAT IS DEFAULT CONSTRUCTOR IN JAVA wHAT IS DEFAULT METHOD IN JAVA

12 Answers   IBM,


Categories