Saturday, June 22, 2019

what are the data types we can use in switch statement?

Problem statement:
what are the data types you can use as a parameter variable for switch statements in Java 8?
Following are the data types we can use as an input parameter variable for switch() statements.
  1. byte
  2. short
  3. int
  4. char
Add-On:
  1. String 
  2. enum

No comments:

Post a Comment

Blueprint for self-improvement

To learn faster: Make the process fun To understand yourself : Write To understand the world better : Read To build deeper connection : Lis...