Example: Pass ArrayList as Function Parameter
Output
ArrayList: Java, Python, JavaScript,
In the above example, we have created an arraylist named languages. Notice the code,
languages.forEach((e) -> {
System.out.print(e + ", ");
});
Here, we are passing the lambda expression as an argument to ArrayList forEach().