Sony and Google are bringing Android N's Developer Preview to the Xperia Z3. To check it out, download the latest preview here and then manually flash your device. From then on, your Z3 will receive all future Developer Preview over-the-air updates directly from Sony.
The Z3 came out in 2014. If you bought Sony's most recent release, the Xperia Z5, you're out of luck; the Developer Preview isn't being offered on those phones. But still, Sony's been pushing hard to be the standard for developers to test on, and this recent move demonstrates that. The preview is already available on the Nexus 5X, 6, 6P, Nexus Player, the Pixel C tablet, and General Mobile 4g (Android One).