Performance cost of coding “exception driven development” in Java?

前端 未结 14 1650
生来不讨喜
生来不讨喜 2020-12-09 10:28

Are there are any performance cost by creating, throwing and catching exceptions in Java?

I am planing to add \'exception driven development\' into a larger project.

14条回答
  •  离开以前
    2020-12-09 11:00

    How would such a design approach effect performance? Do the benefits out-weigh the cost or is it just plain bad coding?

    I'd said that there is almost no benefit of this programming style. Exception should be understood as (well...) exception. It should only should happen in a non-normal situation. How do you define 'normal situation' is pretty much arguable thought...

提交回复
热议问题