Why have we used boolean flag in this, cannt we just put true/false condition in if block ang get answer without using flag?
Why have we used boolean flag in this, cannt we just put true/false condition in if block ang get answer without using flag?