r/badcode • • Apr 07 '21

java Apparently Java can only handle 255 parameters in a constructor...

Post image
4.0k Upvotes

249 comments sorted by

View all comments

Show parent comments

12

u/iNetRunner Apr 07 '21

Stack size limit, if I remember correctly.

-2

u/echosalik Apr 07 '21

Oh... Like x size has effects on y things... This being one of them...

6

u/iNetRunner Apr 07 '21

Parameters (and method local variables) are reserved on the stack. There’s default values for their sizes, though you can over write the defaults as starting parameters for the JVM.