producing powersetby using java and pascal