Merge commit 'e2fc0481cbe3703a64ab31b57caeccbed6d07feb' into ja
This commit is contained in:
@@ -276,7 +276,7 @@ method的语法如下:
|
|||||||
}
|
}
|
||||||
|
|
||||||
### method重写
|
### method重写
|
||||||
上面的例子中,如果Emplyee想要实现自己的SayHi,怎么办?简单,和匿名字段冲突一样的道理,我们可以在Emplyee上面定义一个method,重写了匿名字段的方法。请看下面的例子
|
上面的例子中,如果Employee想要实现自己的SayHi,怎么办?简单,和匿名字段冲突一样的道理,我们可以在Employee上面定义一个method,重写了匿名字段的方法。请看下面的例子
|
||||||
|
|
||||||
package main
|
package main
|
||||||
import "fmt"
|
import "fmt"
|
||||||
|
|||||||
Reference in New Issue
Block a user