Go Language for Java Developers Part 4
Following keywords are reserved and may not be used as identifiers.
Contents

Following keywords are reserved and may not be used as identifiers.

Java Keywords

Go Lang Keywords
There are few obvious keywords like break, case, if, for, etc but few keywords are new in Go Language.
- func: To declare the function
- interface: To declare the interface (It’s different than Java’s interface)
- defer: something like finalise method in Java
- go: To create a thread
- chan: To do synchronised between threads
- var: To declare a variable
- range: It’s like an iterator in Java