Map and Filter with Streams Tutorial

From Progzoo
Jump to: navigation, search

The Country class has five fields:

  public String name;
  public String region;
  public long area;
  public long pop;
  public long gdp;

First Five

Show region for the first five countries:


[Font] [Default] [Show] [Resize] [History] [Profile]

Big Countries

Show name for the countries with a population greater than 200 million:


[Font] [Default] [Show] [Resize] [History] [Profile]

Countries in Africa

Show names for the countries in Africa:


[Font] [Default] [Show] [Resize] [History] [Profile]

Name and Population

Show name and population for countries over 200000000:


[Font] [Default] [Show] [Resize] [History] [Profile]