Skip to content

Commit 12844cb

Browse files
committed
added BiPredicate exmaple using String parameter
1 parent f913150 commit 12844cb

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package java8.functionalInterface;
2+
3+
import java.util.function.BiPredicate;
4+
5+
public class BiPredicateInterfaceDemo3
6+
{
7+
8+
public static void main(String[] args)
9+
{
10+
BiPredicate<String, String> biPredicate = (a, b) -> a.equals(b);
11+
System.out.println(biPredicate.test("java","python"));//false
12+
System.out.println(biPredicate.test("java","java"));//true
13+
}
14+
}

0 commit comments

Comments
 (0)