V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
yukiloh
V2EX  ›  问与答

为什么类适配器模式中的目标抽象类只能为接口,不能为类?

  •  
  •   yukiloh · Apr 22, 2020 · 1366 views
    This topic created in 2202 days ago, the information mentioned may be changed or developed.
    1 replies    2020-04-22 12:35:35 +08:00
    amai0w0
        1
    amai0w0  
       Apr 22, 2020 via Android   ❤️ 1
    java 是不支持多重继承的,类适配器模式里边 adpter 继承 adptee,target 就只能是接口了。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2424 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 09:44 · PVG 17:44 · LAX 02:44 · JFK 05:44
    ♥ Do have faith in what you're doing.