Java Reference
In-Depth Information
11
. If a lambda expression throws a checked exception, the abstract method in the func-
tional interface must have a
throws
clause that includes that exception. True or
False?
___________ supplied by its target context.
)
, show how to specify a method reference to
myStaticMethod( )
.
od( )
and assuming an object of
MyClass
called
mcObj
, show how to create a meth-
od reference to
myInstMethod( )
on
mcObj
.
hasCommonFactor( )
. Have it return
true
if its
int
argument and the value stored in
the invoking
MyIntNum
object have at least one factor in common. For example, 9
and 12 have a common factor, which is 3, but 9 and 16 have no common factor. De-
monstrate
hasCommonFactor( )
via a method reference.