Skip to content

Instantly share code, notes, and snippets.

@hussachai
Last active November 7, 2015 05:55
Show Gist options
  • Save hussachai/5f8f3d2654c7ffa56320 to your computer and use it in GitHub Desktop.
Save hussachai/5f8f3d2654c7ffa56320 to your computer and use it in GitHub Desktop.
//Before Java 8
List<Pet> tmpList = new ArrayList<>();
for(Pet pet: pets){
if(pet.getBirthdate().isBefore(LocalDate.of(2013, Month.JANUARY, 1))
&& pet.getWeight() > 50){
tmpList.add(pet);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment