Skip to content

Instantly share code, notes, and snippets.

@KylePiira
KylePiira / test.java
Created September 24, 2018 11:38
A simple Java program to test integer arithmetic errors.
public class IntDivision {
public static void main(String[] args) {
System.out.println("int / int = int");
System.out.println("1 / 3 = " + 1 / 3);
System.out.println("int / float = float");
System.out.println("1 / 3. = " + 1 / 3.);
System.out.println("Another Example:");