Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumJavafunctional interfacesSingle-choice MCQ

Will the following interface compile as a valid functional interface, and why?

@FunctionalInterface interface Transformer<T> { T transform(T input); default T twice(T x) { return transform(transform(x)); } boolean equals(Object o); String toString(); }