Tag Archives: Lambda

Initializing HashMaps in Java

How can I initialize a HashMap with some pre-defined entries? In this article I’ll show you how you create a HashMap with values. Java doesn’t provide a method like Array.asList(). For initializing a map you have to implement something like that: So this is the double brace initialization idom. I don’t like this way. It’s not very readable, it’s creates a […]

Lambda Expressions

Lambda Expressions sind cool. Das Feature bietet eine Vielzahl von Vorteilen. Meiner Meinung sind Lambda Expression eine tolle Sache, da das Feature – die Verwendung von Single Abstract Method-Interfaces vereinfacht – mittels Functional Interfaces Logik implementieren kann ohne das zusätzlich eine Klasse geschrieben werden muss – und mit neuen der Stream API eine bessere Verteilung und […]

Consent Management Platform von Real Cookie Banner