AD1
- /LoopTrap.java
- /DivideFail.java
- /IndexBreaker.java
- /NullCrash.java
Summary by Bito
This PR adds multiple Java classes that demonstrate common programming bugs and one correct implementation, likely for educational or testing purposes. It also modifies the DivideFail.java class to update variable naming and operation for better readability.
Detailed Changes
- Modifies variable name from 'a' to 'dividend' and updates result calculation in DivideFail.java
- Introduces a class with invalid type casting that will cause ClassCastException at runtime in CastCrash.java
- Adds a class with uninitialized variable usage leading to compile error in UninitializedVar.java
- Introduces classes with incorrect loop conditions and null handling that may not behave as expected in LoopTrap.java and NullCrash.java
- Includes a correct calculator implementation with proper division check in SimpleCalculator.java
Edited by prajakta bendre