Learn Go: 15. Interface

>>Original address Learn what What is an interface? How to define interfaces? How to use the interface? How to embed interfaces? How to assign values between interfaces? How to infer the actual type of interface? How to use an empty interface? concept The interface defines the rules of the implementer by defining abstract methods. Th ...

Posted on Thu, 14 Oct 2021 21:04:06 -0400 by Daddy

Abstract classes and interfaces in java (often tested in interviews, important)!!

abstract class rule of grammar In the example of polymorphic code about Shape, we find that the draw method in the parent class Shape does not seem to have any actual work, and the main drawing graphics are completed by the draw methods of various subclasses of Shape. Like this method without actual work, we can design it as an abstract m ...

Posted on Wed, 29 Sep 2021 18:23:15 -0400 by jjbarnone