“Code too large” compilation error in Java

后端 未结 13 1570
半阙折子戏
半阙折子戏 2020-11-22 14:33

Is there any maximum size for code in Java? I wrote a function with more than 10,000 lines. Actually, each line assigns a value to an array variable.

arts_b         


        
13条回答
  •  佛祖请我去吃肉
    2020-11-22 14:59

    There is a 64K byte-code size limit on a method

    Having said that, I have to agree w/Richard; why do you need a method that large? Given the example in the OP, a properties file should suffice ... or even a database if required.

提交回复
热议问题