Skip to content

Java vs C++

Posted in 未分类

java vs C++

  1. always dynamic despatch
  2. interface: no field, allow multiple inheritance, just define what method, not how (no implementation)  (extends interface name, give restriction)
  3. parametric polymorphism

gnerics VS templates compiled once, reused fo r all Ts, type checking done at definition not at use ???

4. do not allow overloading of operators

5. no user defiened implicit coversions

6. @override help to avoid errors

to be continued…

Be First to Comment

发表评论

电子邮件地址不会被公开。