basic if-else,for,while in java