Should the “set” method(s) of a class return “void” or “boolean”?

前端 未结 0 1030
囚心锁ツ
囚心锁ツ 2020-11-30 04:26

So I run into this fairly often when I\'m designing a class:

class foo {

    private Bar bar;

    public foo(Bar bar) {
        this.bar = bar;
    }

    p         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题