Skip to content

Instantly share code, notes, and snippets.

@lgiudice
lgiudice / traitsInJava
Created May 9, 2015 02:49
proving that, given an object, we can know if some of the methods it understands are from a trait
public interface InterfaceA {
public default String m1() {
return " This is InterfaceA.m1";
}
}
public class SomeClass implements InterfaceA {
public static void main(String[] args) {