In this chapter, we will drill down on Go’s type system and how it differs from Java’s type system. When done with this chapter, you should be able to clearly identify the similarities and differences between the Go and Java type systems.
Primitive/Built-in Types
Java and Go have similar primitive types. In Java, primitive types cannot be placed in collections (except arrays). This makes for a big difference from reference types. Also, primitive types cannot have methods. The notion of a primitive type has less meaning ...