Legian is in the western part of Bali that is majorly known for a lot of unique and beautiful temples. There are a lot of different places to visit in Legian, Bali with family. It is famous for its…
We use Interface to group a set of method. You can think it as a list that all structs that have implemented the required method. If you missing one of the method, you can not in that interface.
We can see that Student, Worker, Human all have implemented the Info method, so the variable i with type person interface will work well.
output:
But what if I change the Human method to Hi() ?
output :
If you have any problem, feel free to ask me !
Why do students find it so hard to read and develop their own thoughts on the material? This is something I’ve been thinking about lately and felt compelled to write about. I don’t have the answers…
Dice are probably the most common gaming devices in the world, and that’s because they’re remarkably good random number generators. True random number generation is essentially impossible, but dice…