Decode School

Decode School - The School for Problem Solvers

Welcome to my blog. Subscribe and get my latest blog post in your inbox.

Java Program to Arithmetic Calculator using switch case Statements

Get a binary arithmetic expression and solve the expression.

Sample Input 1:

12 + 9

Sample Output 1:


Sample Input 2:

4 * 5

Sample Output 2:


Program or Solution


Program Explanation

Based on the choice, instructions in any one of the case will be executed.

Break statement very important in switch.