Guest User

Untitled

a guest
Aug 14th, 2019
448
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