SHARE
TWEET

Untitled

a guest Aug 14th, 2019 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. String[] strings = {"a", "b", "c"};
  2. Stream<String> stream = Arrays.stream(strings);
  3. String[] filtered = stream.filter(s -> s.equals("a")).toArray(String[]::new);
  4.      
  5. public boolean propertyExists(String property) {
  6.     return Arrays.stream(propertyArray).anyMatch(s -> s.equals(property));
  7. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top