柠檬的那个酸_2333

关注

has a ,is a use a

柠檬的那个酸_2333

关注

阅读 48

2023-07-19


类的关系为:

is-a:

has-a:

use-a:

is-a 为继承,或实现,

has-a 为组合或聚集

use-a为使用。

类解释:

public class A {
          B  b = new B();
          void dummyMethod() {
             .....
          }
        }



public class A{
             void dummyMethod() {
                B b = new B();
                b.doSomething();
                ....
              }
       }

 

相关推荐

苦茶如歌

Use Builder pattern to avoid method has too many parameters

苦茶如歌 68 0 0

seuleyang

Your shell has not been properly configured to use 'conda activate'.

seuleyang 33 0 0

北冥有一鲲

CommandNotFoundError: Your shell has not been properly configured to use ‘conda activate‘.

北冥有一鲲 75 0 0

_铁马冰河_

UserWarning: volatile was removed and now has no effect. Use `with torch.no_grad():` instead.

_铁马冰河_ 111 0 0

何晓杰Dev

Your shell has not been properly configured to use ‘conda activate‘. If your shell is Bash or a Bour

何晓杰Dev 77 0 0

骑在牛背上看书

Functin use

骑在牛背上看书 25 0 0

一只1994

Net use

一只1994 70 0 0

艾米吖

"use strict"

艾米吖 57 0 0

雅典娜的棒槌

channel “pecl.php.net“ has updated its protocols, use “pecl channel-update pecl.php.net“ to updated

雅典娜的棒槌 56 0 0

大自然在召唤

address already in use

大自然在召唤 101 0 0

精彩评论(0)

0 0 举报