You can do the following in plain java
Arrays.asList(a, b, c, d).contains(x);
More Related Contents:
- Null Pointer Exception in You Tube Analytics API using Java IntelliJ IDEA?
- Random Number Algorithm – Implementation in Java
- How to convert fuzzy hash string to a file? [closed]
- Can’t add parameter ‘this’
- How to solve expression with /=
- When to use StringBuilder in Java [duplicate]
- Java heap terminology: young, old and permanent generations?
- How to get frequency from fft result?
- How to avoid ‘instanceof’ when implementing factory design pattern?
- Java – how to receive point coordinates after mouse button release (JFreeChart)
- Cannot instantiate the type List [duplicate]
- How to change background color of JTabbedPane?
- Android: ClickableSpan in clickable TextView
- How to check a timeperiod is overlapping another time period in java
- RabbitMQ and relationship between channel and connection
- Sort a List of objects by multiple fields [duplicate]
- Timezones in SQL DATE vs java.sql.Date
- How to fetch Android Market data when there is no API?
- How to write data to two java.io.OutputStream objects at once?
- Java thread creation overhead
- Static context cannot access non-static in Collectors
- XML Node to String in Java
- Why does incrementing a Java int eventually result in a negative number?
- Java 8, how can I implement a switch statement using streams?
- spring data jpa @query and pageable
- Checking if a URL exists or not
- How to get the Context from anywhere? [duplicate]
- Can’t Disable Offline Data In Firestore
- How can I add a Javaagent to a JVM without stopping the JVM?
- How to fetch hibernate query result as associative array of list or hashmap