Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Go Language for Java Developers Part 4

DZone's Guide to

Go Language for Java Developers Part 4

Part 4 of a 5 part series that explains the Go language to Java developers.

· Java Zone
Free Resource

Microservices! They are everywhere, or at least, the term is. When should you use a microservice architecture? What factors should be considered when making that decision? Do the benefits outweigh the costs? Why is everyone so excited about them, anyway?  Brought to you in partnership with IBM.

The following keywords are reserved and may not be used as identifiers.

JAVA LANGUAGE KEYWORDS





abstract continue for new switch
assert default goto package synchronized
boolean do if private this
break double implements protected throw
byte else import public throws
case enum instanceof return transient
catch extends int short try
char final interface static void
class finally long strictfp volatile
const float native super while

GO LANGUAGE KEYWORDS

break default func interface select
case defer go map struct
chan else goto package switch
const fallthrough if range type
continue for import return var

There are few obvious keywords like break, case, if, for, etc but few keywords are new in the Go Language:

  1. func: To declare function
  2. interface: To declare interface (It's different than Java's interface)
  3. defer: something like finalise method in Java
  4. go: To create thread
  5. chan: To do synchronised between threads
  6. var: To declare variable
  7. range: It's like iterator in Java

More Reading

Discover how the Watson team is further developing SDKs in Java, Node.js, Python, iOS, and Android to access these services and make programming easy. Brought to you in partnership with IBM.

Topics:
golang ,java

Published at DZone with permission of Ketan Parmar, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}