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

How to run standalone mock server on local laptop

 Please download the standalone wiremock server from Direct download section at the bottom of the page.  Download and installation Feel fre...