[doc] Add code samples for Protobuf and Avro schemas in java documentation (#4670)
[doc] Add code samples for Protobuf and Avro schemas in java documentation (#4670)

* Add code samples for Protobuf and Avro schemas in java

* Update the code snippets for JSON, Protobuf, and Avro schemas with the preferred form.

massakam/pulsar,merlimat/pulsar,yahoo/pulsar,massakam/pulsar,merlimat/pulsar,yahoo/pulsar,yahoo/pulsar,massakam/pulsar,yahoo/pulsar,merlimat/pulsar,merlimat/pulsar,merlimat/pulsar,massakam/pulsar,massakam/pulsar,yahoo/pulsar,massakam/pulsar,merlimat/pulsar,yahoo/pulsar