Problem : I compiled below code and got possible loss of precision error.
int a = Math.pow(3, 5);
System.out.println(a);
Solution : According to the java documentation, Math.pow() expects two doubles, and returns a double. When you pass two int values to this method, it converts an int to double. But when we assign the value to an int, it gives, possible loss of precision error while compiling...
February 4, 2018
Popular Posts
- Top 100 Free Proxy Sites – Free Proxy Servers List
- Error Project facet Java version 1.6 or 1.7 is not supported in eclipse
- Wamp Server BarPicturePicture Directive error that Could not able to load WampServer
- Error,account is locked,Warning you no longer connected to Oracle,Problem when connecting to HR account in Oracle database
- Error: Starting Tomcat v6.0 server at localhost has encountered a problem in eclipse
- Error! Problem in linking css file in jsp in Dynamic web Project with eclipse
- Oracle Database : System error 5 has occurred. Access is denied
- Error [solved] The superclass “javax.servlet.http.HttpServlet” was not found on the Java Build Path
- Error-JavaEE[Solved] : m2e Maven Dependency Plugin Install in Eclipse
- FormData.delete() and FormData.set() do not support Internet Explorer
Disclaimer
We shall not be liable for the improper or incomplete transmission of the information contained in this communication nor for any delay in its response or damage to your system. We do not guarantee that the integrity or security of this communication has been maintained or that this communication is free of viruses, interceptions or interferences. Anyone communicating with us by email accepts the risks involved and their consequences. We accept no liability for any damage caused by any virus transmitted by this site.