In general, try to use code which is supported through all versions still getting normal updates. [normal == not only security fixes] Put this one first in any case. It's weird to first see something what won't work for me and then I'll have to scroll down to see if anything working is there.
Where it is impossible to express code in the same way for different versions, prefer the newer version (and trail with the older one eventually).
In case the newer version is significantly better (readability etc.), but there is an easy way for expressing it working in both versions, feel free to trail with the improved example.
Yes, Java 8 is out for 2 years. But there are many targets still having the older version. Just as you also probably have to maintain code written the older way. And Java 7 still has "premier support", which is normal updates, just not for everyone...
If there is only Java 8 code, this is potentially confusing to users [doesn't work here; "WTF?"; ...].
I realize that the Java 8 way is sometimes significantly easier. For Q&A, I'd absolutely go with 8 unless otherwise requested as it primarily is targeting the OP (who also can then ask for a downgrade). However in documentation it's not obvious to ask someone for "give me the Java 7 code".