public class Dollar
{
 private int amount;
 public Dollar()
 {   
 }
 public Dollar(int intAmount)
 {   
  this.amount = intAmount;
 }
 public Dollar Times(int  iMult)
 {
  return new Dollar(amount * iMult);
 }
}
第一次看到这样的Times函数,难道就是为了实现Value Object的目的?

另外,问一个与blog有关的问题,在回复的时候,如何保持排版?
我敲得回车全都被屏蔽了!

相关文章:

  • 2022-12-23
  • 2021-08-08
  • 2021-09-16
  • 2021-10-20
  • 2021-11-09
  • 2021-10-01
  • 2021-11-24
  • 2021-09-18
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-10-15
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案