© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2022
B. Feigenbaum, Ph.D.Go for Java Programmershttps://doi.org/10.1007/978-1-4842-7199-5_6

6. Go Types

Barry Feigenbaum, Ph.D.1  
(1)
Austin, TX, USA
 

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 ...

Get Go for Java Programmers: Learn the Google Go Programming Language now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.