Java Basic Logic Building Programs and examples