Issue
I have below function written in VB.Net, Is there a way to convert this to Java. I tried Consumer()
but it only accepts one parameter.
Dim setFunc
As Action(Of String, Object) = Sub(name, val)
Console.WriteLine
("Test Function. Name: {0}, Value: {1}", name, val)
Solution
Have you tried this
BiConsumer<String, Object> setFunc =
(x, y) -> System.out.println("Test Function. Name : " + x + ", Value " + y);
Answered By - Yassin Hajaj Answer Checked By - Robin (PHPFixing Admin)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.