Spring / Spring gRPC Interview Questions
What Java types do common protobuf scalar types map to?
| Protobuf type | Generated Java type |
| int32 / int64 | int / long |
| bool | boolean |
| string | String |
| bytes | ByteString |
| double / float | double / float |
| repeated T | List<T> (via generated getters) |
| message | Generated builder class |
Generated message classes are immutable and built using a fluent Builder API (e.g., HelloRequest.newBuilder().setName("x").build()), which fits naturally with the value-object style common in Spring service layers.
More Related questions...