Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

how to shorten if else if and else in java

return a == b? "b"
     : a == c? "c"
     : a == d? "d"
     : "x";
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #shorten #java
ADD COMMENT
Topic
Name
4+2 =