print
outputs a text representation of an object, whereas write
outputs raw bytes. Try x=7310302560386184563
and look at println(x)
versus write(stdout, x); println()
to see the difference.
8 Likes