Solutions to java labs