- a), b)
- of(), without parameters, produces an empty stream
- java.util.Set
- 135
- 42
- 2121
- No, but it extends the functional interface Consumer and can be passed around as such
- None
- 3
- 1.5
- 42,X,a
- Compilation error, because peek() cannot return anything
- 2
- An alternative Optional object
- a
- One
- Any of filter(), map(), and flatMap()
- Any of distinct(), limit(), sorted(), reduce(), and collect()
Germany
Slovakia
Canada
Brazil
Singapore
Hungary
Philippines
Mexico
Thailand
Ukraine
Luxembourg
Estonia
Lithuania
Norway
Chile
United States
Great Britain
India
Spain
South Korea
Ecuador
Colombia
Taiwan
Switzerland
Indonesia
Cyprus
Denmark
Finland
Poland
Malta
Czechia
New Zealand
Austria
Turkey
France
Sweden
Italy
Egypt
Belgium
Portugal
Slovenia
Ireland
Romania
Greece
Argentina
Malaysia
South Africa
Netherlands
Bulgaria
Latvia
Australia
Japan
Russia