diff --git a/src/main/java/DivideByZero.java b/src/main/java/DivideByZero.java new file mode 100644 index 00000000..a84c4a68 --- /dev/null +++ b/src/main/java/DivideByZero.java @@ -0,0 +1,11 @@ +// https://sig-product-docs.synopsys.com/bundle/coverity-docs/page/checker-ref/checkers/D/divide_by_zero.html + +class DivideByZero { + void testDiv(int a, int b) + { + if (a!=0) { + //Do something + } + int y = b / a; + } +}