can you explain me this, why BiConsumer<String, Integer> accepts method having double primitive type argument and prints double not integer:
Code: Select all
... main code...
BiConsumer<String, Integer> biConsumerMR = MyClass::showNameAge;
biConsumerMR.accept("bob", 50);
}
... end main...
static void showNameAge(String name, double age){
System.out.println(name+" "+age);
}