-
Notifications
You must be signed in to change notification settings - Fork 1
Golang
yan li edited this page Nov 10, 2021
·
9 revisions
Java uses JVM
Go compiles code with go compiler to machine code
1.Go Package: go language has more than 100 package to do tasks:
- input and output
- sorting
- and text manipulation Java has a lot of packages too. From this point there are no difference between Go and Java as a language.
A program will not compile if there are missing packages or if there are unnecessary packages. better as JAVA e.g.
## Interfaces
Interface types express **generalizations or abstractions** about the behavior s of other types
./prog.go:5:8: imported and not used: "fmt"
Go build failed.
./prog.go:7:2: undefined: fmt
Go build failed.
``