Can we use variables in switch case Java?

Variables are not allowed . The break statement is used inside the switch to terminate a statement sequence. The break statement is optional. If omitted, execution will continue on into the next case.19 Şub 2022

Sizin İçin Seçtik  Can we give condition in switch case in Java?

Leave a Reply

Your email address will not be published. Required fields are marked *