A simple implementation of logic gates in Java.