Example on how to use assertions in Java
Go to file
Ramon Caballero c92422dcc0 Update README.md 2024-08-15 15:06:32 +01:00
src Example on how to use assertions in Java 2024-07-23 15:33:39 +01:00
.gitignore Example on how to use assertions in Java 2024-07-23 15:33:39 +01:00
README.md Update README.md 2024-08-15 15:06:32 +01:00

README.md

Assertions

Example on how to use assertions in Java

Compile

javac ./src/Assertions.java -d ./bin/

Run

java -ea -cp ./bin Assertions

Notes

  • -cp Specifies a list of directories, JAR files, and ZIP archives to search for class files.
  • -d Sets the destination directory for class files.
  • -ea or -enableassertions Enables assertions.