Divisor cannot be 0, which is our common sense
So you have to add a check, with = = or! = OK?
Therefore, it is correct to use equals
Read More:
- Pit encountered by entity class data type BigDecimal
- Error in idea compilation: java.lang.OutOfMemoryError Java heap space and java.lang.StackOverflowError
- build.gradle Warming: cannot be applied to ‘(groovy.lang.Closure)’/'(java.lang.String)’
- [Solved] Flowable Start Error: ClassCastException: java.time.LocalDateTime cannot be cast to java.lang.String
- Caused by: java.lang.IllegalStateException: Ambiguou There is already ‘XXXXXXController‘ bean method
- Caused by: java.lang.reflect.InvocationTargetExceptio
- java.lang.NoSuchMethodError: org.json.JSONObject.put(Java/lang/String; Java/util/Collection;) “209151;”
- Used by: Java. Lang. classnotfoundexception: org. PostgreSQL. Driver
- Exception in thread “main“ java.lang.ClassCastException: com.sun.proxy.$Proxy8 cannot be cast to XXX
- Java in idea: warning: source release 11 needs to be resolved by target release 11
- Caused by: java.lang.ClassNotFoundException: com.alibaba.nacos.api.naming.NamingMaintainService
- java.lang.IllegalStateException: ArrayAdapter requires the resource ID to be a TextView
- Caused by: java.net.SocketException : connection reset or caused by: java.sql.SQLRecoverableException solve
- Java:java.lang.OutOfMemoryError : GC overhead limit exceeded solution
- Regular error in UDF java.lang.stackoverflowerror
- java.lang.Error: Unresolved compilation problems
- About the error querying database. Cause: java.lang.nullpointerexception reported in mybatis
- The @ Autowired annotation in springboot is invalid in ordinary classes. How to solve and use the null pointer exception java.lang.nullpointerexception
- Compare whether two sets are the same in Java
- zookeeper Failed to Startup: Error: JAVA_HOME is not set and java could not be found in PATH