Different Java implementations may have different ways of doing this. You can check their source if you are interested in how this is done.
For example, in HotSpotVM, outis a link java.io.PrintStreamthat internally uses java.io.BufferedWriterto write to standard output.
source
share