Simple example to switch statements using string. Syntax : switch(String variable) { case "" : case "" : case "" : : : . } Example : public class StringSwitchDemo { public static void main(String[] args) { StringSwitchDemo demo = new StringSwitchDemo(); String day = "Sunday"; switch (day) { case "Sunday": demo.doSomething(); break; ...
|LEARN | EXPLORE | INNOVATE | I.O.T | A.I | ROBOTICS |