If you not write it, it will ok, but all statements from other cases also get executed.
Manisha said:
(Tue, Mar 20, 2012 09:13:02 AM)
Actually it's compulsory for proper output if we not written it then we not got proper output.
Mrt said:
(Sat, Sep 15, 2012 03:38:57 PM)
I though this is compulsory. because we never use break option then. it execute all statement and if i use default option the it always execut and may be give wrong result ...!
Wasif said:
(Thu, Nov 1, 2012 02:00:05 PM)
Its not compulsory becouse when we want to prform same task for multiple cases in single itteration at that time there is no need use break statement for each case.
Eg:.
As + and - having same priority & * and / has same priority we can write.
Switch (operator).
Case +:.
Case -:.
Return 1;.
Break;.
Case *:.
Case /:.
Return 2;.
Break;.