MongoDB manual says by default chunk size is 255K.
Its current Java API says its 256K.
Which one is right or both?
It used to be 256K, and has since been changed to 255K. The extra 1K is for meta-data overhead, while still being within 256K.
This has been fixed in 2.12.0 and 3.0.0: https://jira.mongodb.org/browse/JAVA-1154
This appears to be an error in the documentation. The JIRA ticket references git commits that fix it in the code. Feel free to open up a documentation-related ticket within the MongoDB Java Driver Project JIRA.