Achieving True and False Results with One Java Code!