package main
import "fmt"
func main() {
fmt.Println(add(10, 20))
}
func add(x int, y int) int{
return x + y
}
Outputs:
30
package main
import "fmt"
func main() {
fmt.Println(add(10, 20))
}
func add(x int, y int) int{
return x + y
}
Outputs:
30
本文标题:Go methods
本文链接:https://www.haomeiwen.com/subject/qekiuqtx.html
网友评论