0

for example

myClass x = new myClass(5);
myClass y = new myClass(2);
System.out.println(x+y);

Output:

7

the same in Number classes

  • 4
    it's quite easy: you can't – jhamon Apr 06 '20 at 08:33
  • "the same in Number classes" actually, `Number` doesn't support this either. It's only classes with auto-unboxing that support numeric addition (e.g. `Integer` does; `BigDecimal` doesn't). – Andy Turner Apr 06 '20 at 08:39

0 Answers0