Difference between 2NF and BCNF

isn't this table also not in 2NF?

No it doesn't violate 2NF. 2NF requires that every nonprime attribute is fully dependent on every candidate key. Since the table in your example has no nonprime attributes it cannot violate 2NF. This is the essential difference between BCNF and 2NF/3NF. BCNF requires that every attribute must be fully dependent on every key. The lower normal forms of 2NF and 3NF only require that of nonprime attributes.

A nonprime attribute means an attribute that is not part of any candidate key.