Maximum size of a method in java?

后端 未结 3 594
感动是毒
感动是毒 2020-11-27 19:30

I come to know that the maximum size of a method in java is 64k. And if it exceeds, we\'ll get a compiler warning like \"Code too large to compile\". So can we call this a

3条回答
  •  遥遥无期
    2020-11-27 19:58

    64k is quite a lot, if you exceed it you may think about reorganizing you code.

    In my project I met this constraint once in generated sources. Solved by just splitting one method to several.

提交回复
热议问题