Home / Questions / Variables used in a switch statement can be used with which datatypes?
Explanatory Question

Variables used in a switch statement can be used with which datatypes?

👁 983 Views
📘 Detailed Answer
🕒 Easy to Read
Read the answer carefully and go through the related questions on the right side to improve your understanding of this topic.

Answer with Explanation

Variables used in a switch statement can only be a string, enum, byte, short, int, or char.